Jump to content

jQuery picture infinite cycle


Hazukiy

Recommended Posts

Hi, I'm trying to make a infinite picture cycle in jQuery; I know how to do it in Javascript but cross-referencing languages would be a little bit more harder so I'm wondering if they're a way I can do this in jQuery? Here's what I've attempted to do but doesn't work :/ Any ideas? Thanks. :)

<script>

$.seq = function() {
	$(this).fadeIn(2000);
	$(this).delay(5000);
	$(this).fadeOut(300, function() {
		$(this).next().seq();
  });
  return this;
};

$(document).ready(function() {
	$("#picture_main_1").seq();
	$("#picture_main_2").seq();
	$("#picture_main_3").seq();
	$("#picture_main_4").seq();
});

</script>
Link to comment
https://forums.phpfreaks.com/topic/277772-jquery-picture-infinite-cycle/
Share on other sites

This is something I started to put together until I realized that someone else would have surely done it:

 

http://jsfiddle.net/T6PcS/

 

So the jQuery credit goes to http://stackoverflow.com/questions/5422001/jquery-infinite-loop-for-function user Felix King.

 

Tweak that until you have what you want.

 

Denno

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.