Question

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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top