views:

625

answers:

1

This is in relation to the jQuery plugin "scrollTo" from this here: link text

The plugin works fine except when you want to use it with a newly created DOM element. Is there any method to using this plugin with DOM elements that are created after the page has loaded (from other user interaction). This would be similar in application as the 'live' handler for jQuery.

Thanks!

+1  A: 

scrollTo itself surely works for new elements because it doesn't get attached, it is just called every time and it recalculates all from scratch. If you're talking about serialScroll or localScroll, both provide a setting called "lazy" that allows you to have dynamic elements.

This is correct, after much debugging I discovered I had attempted to scrollTo an element that hadn't yet been created, just had to move the scrollTo function to a different line. Thanks!
Chris Cooper