1) DD ScrollSpy Menu
2) http://www.dynamicdrive.com/dynamici...ollspymenu.htm
3) Describe problem:
Hello Forum,
has anyone an idea how to realize an automatic scrollfunktion in jQuery?
This script ist wonderful!
Thanks a lot for feedback
LucioPerca
1) DD ScrollSpy Menu
2) http://www.dynamicdrive.com/dynamici...ollspymenu.htm
3) Describe problem:
Hello Forum,
has anyone an idea how to realize an automatic scrollfunktion in jQuery?
This script ist wonderful!
Thanks a lot for feedback
LucioPerca
Hmm do you mean have the script automatically scroll to the various breaking points set by Spy Menu on its own every x seconds?
DD Admin
Hi,
yes, that would be really desirable.
Do you have a Idde how this problem could be solved?
Thank you very much
lucioperca
Using the invocation code of demo #1 on the script page as illustration, the code in red that follows will automatically trigger the going to of the various sections referred to inside the spy menu every x seconds. Clicking anywhere on the page cancels this cycling:
Change "#horizontalmenu" to the ID of your spy menu, and 3000 to the desired pause (in milliseconds).Code:<script> jQuery(function($){ // on document load $('#horizontalmenu').ddscrollSpy({ // initialize first demo scrolltopoffset: -50 }) var $targets = $('#horizontalmenu').find('a[href^="#"]') var cur = 0 var ddspytimer1 = setInterval(function(){ $targets.eq(cur).trigger('click.goto') cur = (cur < $targets.length - 1)? cur+=1 : 0 }, 3000) $(document).on('click', function(){ clearInterval( ddspytimer1 ) }) </script>
DD Admin
Thanks a lot.
This solution works perfectly!
Bookmarks