Please be have patience with a newbie.
Ok, i hope i can explain it.
I have a scrollable vertical that has 4 scrollable insite. This 4 scrollables are controlled by thumnails that are in another scrollable. So every one off this 4 scrollable has a navi-scrollable.
First my code:
- // main vertical scroll
- $("#mainscroll").scrollable({
- // basic settings
- vertical: true,
- size: 1,
- clickable: false,
- // up/down keys will always control this scrollable
- keyboard: 'static',
- // assign left/right keys to the actively viewed scrollable
- onSeek: function(event, i) {
- horizontal.scrollable(i).focus();
- }
- // main navigator
- }).navigator("#main-navi");
- // horizontal scrollables. each one is circular and has its own navigator instance
- var horizontal = $(".scrollable").scrollable({size: 1,clickable:false, globalNav:true}).circular().navigator({
- navi: ".scrollable-navi",
- naviItem: 'img',
- });
- // initialize scrollable-navi
- $("div.scrollable-navi").scrollable({size: 3,nextPage:'.nexting',prevPage:'.preving'});
- // when page loads setu
- horizontal.eq(0).scrollable().focus();
As you can see, i set for the horizontal scrolls that resists in the main, the navigation ".scrollable-navi" and thumbs "img". But i bet the profis know that this scrollable-navi(s) control all horizontal scrolls.
Sure, i can make horizontal1, horizontal2 and so on and can give them all unique id's. But i think there must be a better way. Is there a way to say: "hey horizontal, use the next .scrollable-navi"?
It also would be nice to set the assign left/right keys to the scrollable-navi and not the horizontal. But i dont know what onSeek: function(event, i) exactly means.
If somebody wants a link to the production site to see what i mean i can sent it private.