Jquery wildcard selectors for calling plugin? -


to keep brief, i'm trying select #small-cycle1, #small-cycle2, etc. jquery cycle plugin. using wild cards select not seem working, writes out pager nav of cycles each cycle.

below how i'm getting around problem now.

        $('#small-cycle1').cycle({              speed:       0,              timeout:     0,             pager:      '#nav1',             pagerevent: 'mouseover',              pauseonpagerhover: true         });         $('#small-cycle2').cycle({              speed:       0,              timeout:     0,             pager:      '#nav2',             pagerevent: 'mouseover',              pauseonpagerhover: true         });         $('#small-cycle3').cycle({              speed:       0,              timeout:     0,             pager:      '#nav3',             pagerevent: 'mouseover',              pauseonpagerhover: true         });         $('#small-cycle4').cycle({              speed:       0,              timeout:     0,             pager:      '#nav4',             pagerevent: 'mouseover',              pauseonpagerhover: true         });         $('#small-cycle5').cycle({              speed:       0,              timeout:     0,             pager:      '#nav5',             pagerevent: 'mouseover',              pauseonpagerhover: true         }); 

is possible use wildcards in selector , pager: option?

i'm not familiar cycle plugin code should select elements want. set 'cyclecount' number of slideshows have on page , loop through them.

var cyclecount = 5; for(var = 1; <= cyclecount;i++){     $('#small-cycle'+i).cycle({          speed:       0,          timeout:     0,         pager:      '#nav'+i,         pagerevent: 'mouseover',          pauseonpagerhover: true     }); } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -