Never seen that before, try the following plugin which includes the latest release and the jQuery 1.4.2 release but it should work fine with jQuery 1.5.1.
I would love some help on this as well. The plugin looks awesome, but the “documentation” is horrible… all of the examples are very skeletal code snippets that don’t really explain how to do any of the method calls.
Any help in this area would be appreciated.
I am trying, for example, to do :
$.scrollTo(‘800px’);
or
$(‘#mydiv’).scrollTo(‘#anotherDiv’);
etc. etc… not getting anything. Some very simple docs explaining the basic way of making it work would be splendid. Very useful plugin from what I can see.
The demo page is part of what I’m having a problem with. The examples look great But the code is all small snippets that don’t give a larger view of what’s going on.
For example, I"ve included the jQuery source in my documents (I reference it locally), been using jQuery for about a month now, with no problem. I also downloaded and include the jQuery scrollTo plugin…
All i’m doing it dynamically creating a div and then I want JQuery to scroll to the new div once it’s created… but I can’t seem to make any scrolling happen at all.
Changer IS scrollable. I see, maybe you’re helping me see what’s wrong…
basically i have a scrollable element called changer, with divs inside. Every time I add a new div, I want the changer element to scroll to “reveal” the new div that’s been added inside.
I’m using the jQuery appendTo function to keep dumping new divs in there.
Apparently, you can’t “scroll to” an object that has been dynamically generated on the page. Well, you probably CAN, but not the way I’m doing it. If I DON’T dynamically generate the new div, then I am able to scroll to it using the function. It just jumps right to it without scrolling smoothly, but I’m sure that’s an easy fix.
At any rate, that feedback was very helpful. I have the basic scroll to working now, just need to figure out how to make it scroll to dynamically generated items, which should be just a simply matter of doing some research.
Yeah, I am going to change it so that multiple divs generated will each have a unique number. For now I was just generating one. I will probably append a number to the end of each id name to make them all unique.
I will also try passing the generated items to the scrollTo method as well.