When your jquery accordion has alot of content it tends to scroll the user toward the bottom of the page. If you want to scroll back to the top of the section they opened change your js to look like-a-so.
$(".accordion").accordion({ activate: function(event, ui){ var scrollTop = $(".accordion").scrollTop(); var top = $(ui.newHeader).offset().top; //do magic to scroll the user to the correct location
//works in IE, firefox chrome and safari $("html,body").animate({ scrollTop: scrollTop + top -35 }, "fast"); }, heightStyle: 'content' , active: false, });
3 comments:
Hi,
Could you show me a working demo for this code, I think this is what I am after.
Thanks a lot
great
https://saglamproxy.com
metin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
J26
Post a Comment