Anchor html speed with jquery -


i use code format anchor speed, doesn't work on ie (7,8,9 & 10) , firefox. can tell me doing wrong , how optimize anchor speed?

$('a.anchorlinks').on('click', function(e){             e.preventdefault();             var divid = $(this).attr('href');             var position = $(divid).position();             $('body').animate({scrolltop: position.top}, 1000);         }); 

instead of position, use offset() http://api.jquery.com/offset/


Comments

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -