/    Sign up×
Community /Pin to ProfileBookmark

Individually timed images in Slide show

I am Using a simple jquery slideshow below.
I want to allow for [U]individually timed images[/U] How & where do I add the time.
(This allows me to sync to the music better than a fixed image time)
Thanks
Sandy

/***
Simple jQuery Slideshow Script
Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc. Please link out to me if you like it ?
*
**
/

function slideSwitch() {
var $active = $(‘#slideshow IMG.active’);

if ( $active.length == 0 ) $active = $(‘#slideshow IMG:last’);

// use this to pull the images in the order they appear in the markup
var $next = $active.next().length ? $active.next()
: $(‘#slideshow IMG:first’);

// uncomment the 3 lines below to pull the images in random order

// var $sibs = $active.siblings();
// var rndNum = Math.floor(Math.random() * $sibs.length );
// var $next = $( $sibs[ rndNum ] );

$active.addClass(‘last-active’);

$next.css({opacity: 0.0})
.addClass(‘active’)
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass(‘active last-active’);
});

}

$(function() {
setInterval( “slideSwitch()”, 5000 );
});

</script>

<style type=”text/css”>

/*** set the width and height to match your images **/

#slideshow {
position:relative;
height:576px;
}

#slideshow IMG {
position:absolute;
top:0;
left:0;
z-index:8;
opacity:0.0;
}

#slideshow IMG.active {
z-index:10;
opacity:1.0;
}

#slideshow IMG.last-active {
z-index:9;
}

</style>

=====================================

<div id=”slideshow”>
<img src=”HTss01Aerial.jpg” alt=”Slideshow Image 1″ class=”active” />
<img src=”HTss02Light.jpg” alt=”Slideshow Image 2″ />
<img src=”HTss03Light.jpg” alt=”Slideshow Image 3″ />
<img src=”HTNewLight.jpg” alt=”Slideshow Image 4″ />
<img src=”HTHammock.jpg” alt=”Slideshow Image 5″ />

to post a comment
CSS

0Be the first to comment 😎

×

Success!

Help @motuiti spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...