Html
    Css
    Js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$(function() {
$('#toright').hover(function() {
$("#toleft").hide()
}, function() {
$("#toleft").show()
})
$('#toleft').hover(function() {
$("#toright").hide()
}, function() {
$("#toright").show()
})
})
var t;
var index = 0;
//
t = setInterval(play, 3000)
function play() {
index++;
if (index > 4) {
index = 0
}
$("#lunbobox ul li").eq(index).css({
"background": "#999",
"border": "1px solid #ffffff"
}).siblings().css({
"background": "#cccccc",
"border": ""
})
$(".lunbo a ").eq(index).fadeIn(1000).siblings().fadeOut(1000);
};
//
$("#lunbobox ul li").click(function() {
$(this).css({
"background": "#999",
"border": "1px solid #ffffff"
}).siblings().css({
"background": "#cccccc"
})
var index = $(this).index(); //
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.9.1
 立即下载

jQuery轮播图

0