Simple Carousel using jQuery
In a separate Thread, I (foolishly) suggested that I could implement a carousel using the same approach: https://www.talkgraphics.com/showthr...ages-is-loaded
I have used the same graphics and their positions so do not panic that things are popping up all over.
To create your own carousel:
- Collect a set of images, objects or graphics and centre them all together on your page.
- Give them all the Name htmlclass=illy.
- Add the simple Carousel Widget to your page as the topmost object.
- Done.
To customise for yourself:
- The Widget has a Name UsesJQuery - don't remove this.
- Add a backdrop box or shape - don't Name it.
- The order of your objects is changed in the Page and Layer gallery.
- The fade in and out times and the show time can be altered in the Widget Body code:
Code:
<script>
$(document).ready(function(){
(function fade(idx) {
var $illy = $('.illy');
$illy.hide();
$illy.eq(idx).fadeIn(1000).delay(8000).fadeOut(1000, function () {
fade(idx + 1 < $illy.length ? idx + 1 : 0);
});
}(0));
});
</script>
Acorn
1 Attachment(s)
Re: Simple Carousel using jQuery
Example here: Attachment 118451
Acorn
Re: Simple Carousel using jQuery
Thanks for that, Acorn. Might come in handy one day!
Re: Simple Carousel using jQuery
Excellent. Delay is way too long though. 2500-3000 works better IMHO. Works great with photos.
Is there a way to have the photos overlap so one is fading in while the other is fading out?
Re: Simple Carousel using jQuery
Nice code, thanks for sharing.
Re: Simple Carousel using jQuery
Another great contribution acorn.
I am wondering if these should all be compiled somehow or reposted in the plugins area for easier perusal?
Re: Simple Carousel using jQuery
Excellent fun carousel Acorn. Thank you for sharing :)
Re: Simple Carousel using jQuery
Quote:
Originally Posted by
sculptex
Another great contribution acorn.
I am wondering if these should all be compiled somehow or reposted in the plugins area for easier perusal?
I don't know of any "plugins area" !?
Acorn
Re: Simple Carousel using jQuery
Re: Simple Carousel using jQuery
Quote:
Originally Posted by
sculptex
Got you now. I took this area to be for Photoshop Plugins...
Acorn