Using jQuery UI with jQuery Cycle plugin
Im using the ui tabs to seperate content, for each seperate tab panel theres a set of images which I have cycling through using the jquery plugin using a next and previous transition.
trouble i've got is when using the controls its cycling the hidden tab panels images as well, so when changing tabs it doesnt land on the image i want it to. im trying to to work out a way to cycle based on the active tab panel
heres what i've got so far im trying to add an active class to the visible panel and only cycle to that active class any ideas?
-
- if($('.ui-tabs-panel').is(':visible')){
- $('.content-scroll').addClass('content-scroll-active');
- $('.content-scroll').cycle({
- fx: 'fade',
- speed: 'slow',
- timeout: 0,
- next: '#contentBox span.next',
- prev: '#contentBox span.prev'
- });
- }else{
- $('.content-scroll').cycle('stop');
- $('.content-scroll').removeClass('content-scroll-active');
- }