so I am have some divs set up with a toggle function, and I want the first to be toggled visible on page load, what is the best way to do this? Thanks
$('.paneltop').click( function(){
$(this).next('div').animate(
{'height':"toggle"});
$(this).toggleClass('openpane')
You can use
jQuery.togglealong with.ready().It should look like this:
Note: if you want it to be open, you can use
.show()instead of.toggle().jQuery.toggle – http://api.jquery.com/toggle/