Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-04-2008, 02:35 PM   PM User | #1
ASAAKI
Regular Coder

 
Join Date: Jul 2002
Location: This little Earth.
Posts: 383
Thanks: 0
Thanked 0 Times in 0 Posts
ASAAKI is an unknown quantity at this point
Angry jQuery scrollTo plugin

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):

Code:
<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.
__________________
'If you don't stand for something, you'll fall for anything.'
ASAAKI is offline   Reply With Quote
Old 08-04-2008, 03:18 PM   PM User | #2
binaryWeapon
Regular Coder

 
Join Date: Sep 2007
Location: AZ, USA
Posts: 685
Thanks: 6
Thanked 46 Times in 46 Posts
binaryWeapon is on a distinguished road
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.

Last edited by binaryWeapon; 08-04-2008 at 03:20 PM..
binaryWeapon is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:22 AM.


Advertisement
Log in to turn off these ads.