<asp:Label ID="label1" runat="server">This is Heading</asp:Label> <input type="button" id="button2" value="+" style="border:0px;font-size:15px;"/> <div id="mydiv" style="display:none;"> <div>This content line1</div> <div>This content line2</div> <div>This content line3</div> <div>This content line4</div> <div>This content line5</div> </div>
<script type="text/javascript"> $(document).ready(function () { $("#button2").click(function () { if ($(this).val() == '-') { $("#mydiv").slideUp("slow"); $(this).val("+"); } else { $("#mydiv").slideDown("slow"); $(this).val("-"); } }); }); </script>
Awesome Coding !! :)
Login to post response