Simple jquery slider freezes on browser previous -
i've done simple jquery slider
$(document).ready(function(){ $('li').hover(function(){ $(this).children('div').slidetoggle(); }); });
like this. works perfectly, div
's hidden , display when hover li
item, there's problem. when press "back" button in browser slidetoggle
"freezes" in "opened" position (meaning div
displayed) , start working backwards. ideas fix?
try sliding them document ready, so:
$(document).ready(function(){ $('li > div').slideup(); $('li').hover(function(){ $(this).children('div').slidetoggle(); }); });
this assure divs slide upwards , prevent working 'backwards'.
Comments
Post a Comment