jQuery accordion slideToggle problem -


i have accordion html loads live via ajax in div. div has close button can remove dom when clicked. when div created again without reloading page slidetoggle triggers twice , down , hides content.

here html loaded via ajax:

<div id="slidetoggle">   <h3>title</h3>   <p>content</p>    <h3>title</h3>   <p>content</p>    *..and on..*   </div> 

here jquery:

$("#slidetoggle p:not(:first)").hide();  $("#slidetoggle h3").live('click', function(){   $(this).next("p").slidetoggle("slow").siblings("p:visible").slideup("slow"); }); 

thanks in advance!

use .die() when remove nodes dom.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -