This blog is my memo for collecting IT stuffs. And some my free softwares.Please use facebook to leave comments.

How to scroll to the position of object by jquery

Last update 2009-10-09 00:23:17 (More than 1 year old)

Get the position of object that you want to move to using offset().top, and change scrollTop of body using animate() function.

var divOffset = $('#hogeContainer').offset().top;
$('body').animate({scrollTop: divOffset + 'px'}, 1000);
Last update 2009-10-09 00:23:17

Comment Delicious

todo
facebook support
Page transaction
RSS feed
Search
Auth
Last update
Category
Multi-language
User
Open source
Environment
php-5.1.6 with PDO
SQLite-3.3
IE6
FireFox-1.5
RSS
Unauthorized

Search
Google