Jquery Toggle div show/hide issue in asp.net Item template

I applied following code in HTML and it is working fine. After first click on the (H3) tag heading, description appears and when I click again on (H3) tag heading, description gets disappeared. But when I apply same code in ASP.NET in (ItemTemplate) and click on (h3) tag heading, description appears for a while (milisecond) and than disappear automatically. Any idea what is missing in jquery?\[code\]<div class="accordion"> <h3>Heading</h3> <p>Description should be show/hide</p> </div> $(document).ready(function(){ $(".accordion h3:first").addClass("active"); $(".accordion p:not(:first)").hide(); $(".accordion h3").click(function(){ $(this).next("p").slideToggle("fast") .siblings("p:visible").slideUp("fast"); $(this).toggleClass("active"); $(this).siblings("h3").removeClass("active"); });});\[/code\]
 
Back
Top