Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.