home.js
1.88 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
$(function () {
var isMobile = document.body.clientWidth <= 768
//index banner
$('.banner_index').flexslider({
animation: 'slide',
controlNav: !isMobile,
directionNav: !isMobile,
keyboard: true,
slideshow: true, // Boolean: 是否自动播放
slideshowSpeed: 5000, // Integer: ms 滚动间隔时间
animationSpeed: 1000, // Integer: ms 动画滚动速度
pauseOnAction: false,
animationLoop: true,
//pauseOnHover: true,
//触屏滑动后继续自动轮播
before: function (slider) {
slider.pause()
slider.play()
}
})
// css3
var isIE = function (ver) {
ver = ver || ''
var b = document.createElement('b')
b.innerHTML = '<!--[if IE ' + ver + ']>1<![endif]-->'
return b.innerHTML === '1'
}
if (isIE(8) || isIE(7)) {
} else {
// 动画
wow = new WOW({
animateClass: 'animated'
})
wow.init()
}
var c_width = document.body.clientWidth
var _index = 0
if (c_width <= 1920) {
$('.in1_list ul li').mouseover(function () {
_index = $(this).index()
$(this).stop().stop().animate({ width: 530 }, 500).siblings('li').stop().animate({ width: 284 }, 500)
$(this).addClass('on').siblings().removeClass('on')
})
}
if (c_width <= 1600) {
$('.in1_list ul li').mouseover(function () {
_index = $(this).index()
$(this).stop().stop().animate({ width: 510 }, 500).siblings('li').stop().animate({ width: 230 }, 500)
$(this).addClass('on').siblings().removeClass('on')
})
}
jQuery('.slideTxtBox').slide({
effect: 'left',
// trigger:"click",
pnLoop: true,
})
jQuery('.in3_slide').slide({
mainCell: '.in3_list ul',
effect: 'leftLoop',
autoPlay: true,
autoPage: true,
scroll: '1',
vis: 3,
prevCell: '.in3btn_prev',
nextCell: '.in3btn_next'
})
// 数字增加
$('.single-num').countUp()
})