Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scrollable next() fails after use of seekTo #121

Closed
qualle opened this issue Jul 21, 2010 · 5 comments
Closed

scrollable next() fails after use of seekTo #121

qualle opened this issue Jul 21, 2010 · 5 comments

Comments

@qualle
Copy link

qualle commented Jul 21, 2010

Hi there,

since it is not possible to use your own selector within the "navi" property of the plugin "navigator" (http://flowplayer.org/tools/forum/35/45797) I coded my own navigation. The problem i got now is that after i used the navigation the next() functions does not work behind the second element. So it scrolls to the second element in the scrollable and then its "disabled". Here is my code:

    if(0<$('.slideshow').length){           
        $('.slideshow').scrollable({
            circular: true,
            mousewheel: false
        }).click(function(){
            $(this).data('scrollable').next();  // the next function which fails            
        });

        $('.thumbs .thumb').click(function(event){
            event.preventDefault();             
            var attributes = $(this).attr('rel').split("-");
            var slideshowInstance = $('.slideshow').eq(attributes[0]);  // get the right slideshow instance         
            slideshowInstance.data('scrollable').seekTo(attributes[1],400); // seek to the specific element
        });
    }

Is this a bug or did i missunderstand something?

Browser: FF 3.6.6
jQuery: 1.4.2
jQuery Tools: 1.2.3

Kind regards

@tipiirai
Copy link
Contributor

if you have multiple similar navigators on a page and you are using a selector such as .thumbs you need to wrap each scrollable inside a wrapper element. after this all works. more about this:

http://flowplayer.org/tools/scrollable/#multiple

@qualle
Copy link
Author

qualle commented Jul 23, 2010

Thanks, I already did know that but I got multiple scrollables where the navigation is not within the same div-element.

They are located on a completely different parts of the page (but on the same site, of course).

@tipiirai
Copy link
Contributor

ok. I have now made a change. The navi can now be supplied as jQuery object. Here is the patch:

http://github.com/jquerytools/jquerytools/commit/d0b52e8114d335c982e6049d2949c1ebc529ac47

take the latest version here from github and see if it works for you.

@qualle
Copy link
Author

qualle commented Jul 23, 2010

Yes, thank you! Works like a charm now

@tipiirai
Copy link
Contributor

great

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants