jquery - jqModal creating a weird bug in my scrollTo script -
at top of page have 4 links , each take different part of page. have used scrollto plugin works great, there weird bug script have noticed occurs after have called jqmodal popup window.
when click on 1 of links page doesn't scroll expected. instead, skips section without scrolling , scrolls top of it. it's annoying , don't know how fix it. thought maybe include start position in script getting current position of top of page using: $(document).scrolltop()
not work :(
$('.home, #header ul li').click(function(e){ e.preventdefault(); var id = $(this).attr('data-rel'); window.location.hash = id.replace(/_/g,"-"); $.scrollto('#'+id+'_anchor', 500, { easing : 'easeincubic', onafter:function(){ $('.home, #header ul li').removeclass('selected'); $(this).addclass('selected'); } }); });
Comments
Post a Comment