Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-22-2010, 04:34 PM   PM User | #1
loamguy1
Regular Coder

 
Join Date: Nov 2007
Posts: 106
Thanks: 13
Thanked 0 Times in 0 Posts
loamguy1 is an unknown quantity at this point
jQuery cycle plugin issue - "cycle terminating too few slides"

Hi all,

Relative jQuery newbie here with an issue on the cycle plugin.

I have an AJAX enabled tab feature. The first tab, "Featured", uses the cycle plugin to rotate through 3 DIVs. Works great.

Problem is, if you click on another tab besides "Featured", then click back on "Featured", the DIVs don't rotate. I'm getting the "cycle terminating too few slides" error.

Page load it works though.

Here's my code. I set up a click event on "Featured" to get the DIVs rotating again, but no luck. The AJAX file for "Featured" does have multiple DIVs to load.

Appreciate any ideas!
Code:
$(document).ready(

	function() {

		$('#case_content').cycle(
			{ 
	    	speed:1000,
			timeout:3000,
    		pager:  '#nav'
			}
		);
		
		if($) {
			alert("Loaded from document.ready");
		}	

		$('#featured').click(
		
			function() {
			
				//To stop:
				jQuery('#case_content').cycle('stop');

				//To restart (same as first start):
				jQuery('#case_content').cycle(
					{ 
					speed:1000,
					timeout:3000,
					delay:-5000
					}
				);
			}
		);
	}
);
loamguy1 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:47 PM.


Advertisement
Log in to turn off these ads.