Skip to content

Commit 48d587a

Browse files
committed
Adding jquery script
1 parent 8d86e5a commit 48d587a

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

javascript/MM_functions.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
function slideSwitch() {
2+
var $active = $('#slideshow IMG.active');
3+
4+
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
5+
6+
var $next = $active.next().length ? $active.next()
7+
: $('#slideshow IMG:first');
8+
9+
$active.addClass('last-active');
10+
11+
$next.css({opacity: 0.0})
12+
.addClass('active')
13+
.animate({opacity: 1.0}, 1000, function() {
14+
$active.removeClass('active last-active');
15+
});
16+
}
17+
18+
$(function() {
19+
setInterval( "slideSwitch()", 5000 );
20+
});
21+
122
function MM_swapImgRestore() { //v3.0
223
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
324
}

0 commit comments

Comments
 (0)