...

View Full Version : jQuery scrollTo plugin



ASAAKI
08-04-2008, 02:35 PM
I've gone through the documentation for the ScrollTo plugin, checked the source code where others are using it, tried localscroll and serialscroll... somehow I just can't get started, no matter what.

Is there any step-by-step guide for scrollTo? I've actually been needing to use serialScroll but since I somehow wasn't able to use it, I figured I'd start out with localScroll. No luck there either! Surely it's just a matter of linking the js and adding a few lines on document.ready...?? I'm using other jquery plugins fine.

What am I doing wrong?

Trying out the simplest thing here for localscroll, and just to see the scroll happen I have gigantic font and added lots of line breaks (not shown here):




<a href="#1" id="first">First </a><br />
<a href="#2" id="second">Second </a><br />
<a href="#3" id="third">Third </a><br />
<a href="#4" id="fourth">Fourth </a><br />


<ul>
<li id="1"> Somwhere over the rainbow</li>
<li id="2"> Skies are blue</li>
<li id="3"> Birds fly over the rainbow</li>
<li id="4"> Why then oh why can't I?</li>
</ul>

<script>
$(document).ready(function(){
$.localScroll();
});
</script>



This is the easiest thing possible that I tried, and then comes the error that localScroll is not a valid function.

I've included every single file there can be related to scrollTo, including the interface plugin. I'm not using anything apart from jquery, no prototype or anything else.

binaryWeapon
08-04-2008, 03:18 PM
You did embed the jQuery and scrollTo libraries, right? Before you called the function? And should the the $.localScroll(); be inside a document.onload=? Forgive me if thats what $(document).ready(function(){ does; I'm not too familiar with jQuery.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum