Can somebod开发者_运维百科y help me, I want to use in jQuery something like "ScrollTo".
When I click something , --- > scroll to some div
Like in HTML with anchors
Thanks !!!
If you're looking for a quick way to do it, this should work:
$('html').animate({scrollTop: $('#myelement').offset().top});
See jQuery animate for more options.
Try the ScrollTo jquery plug-in.
精彩评论