Jquery - Toggle & page refresh open div
How do you open a JQuery toggle from a url? at the moment I am using return false to prevent an href action but I would really prefer to keep the href action to refresh the page.
here is my code
$('#adminMenu h3').click(function() {
$(this).next('ul').slideToggle("slow");
return false;
});
and this is the html
<h3 title="first toggle ul"><a href="?p=first">first toggle ul</a></h3>
<ul>
<li><a href="?inc=aa" class="pageLink" title="A page">A page</a></li>
<li><a href="?inc=ab" class="pageLink" title="AA page">A page</a></li>
</ul>
<h3 title="Next toggle ul"><a href="?p=next">Next toggle ul</a></h3>
<ul>
<li><a href="?inc=ba" class="pageLink" title="A page">A page</a></li>
<li><a href="?inc=b" class="pageLink" title="A page">A page</a></li>
<li><a href="?inc=c" class="pageLink" title="A pag开发者_如何学Goe">A page</a></li>
<li><a href="?inc=d" class="pageLink" title="A page">A page</a></li>
</ul>
As I said for numerous reasons I really want to refresh the page on click of the
The question is not clear. But if you need to REFRESH the page AFTER the slideToggle you can do:
$('#adminMenu h3').click(function() {
$(this).next('ul').slideToggle("slow",function(){window.location.reload()});
return false;
});
Don't know if this helps!
精彩评论