How to correctly add the .scrollTo plugin?
Posted
by konzepz
on Stack Overflow
See other posts from Stack Overflow
or by konzepz
Published on 2010-04-07T17:17:36Z
Indexed on
2010/04/07
17:23 UTC
Read the original article
Hit count: 444
I have this script, running on a links list:
$('li#linkcat-25 a').bind('click', function (e) {
e.preventDefault();
$('#preview').load($(this).attr('href'));
$('#loading').show('fast');
$('#preview').hide('fast');
$('#preview').show('fast');
$('#loading').hide('fast');
});
How can I easly add a .scrollTo effect, so that clicking on one of those href elements will show/hide as proposed, and when finished, will smoothly scroll down to the #preview
div?
Thank you!
© Stack Overflow or respective owner