...
|
...
|
@@ -3500,49 +3500,49 @@ var $ = require("jquery"); |
|
|
}($));
|
|
|
});
|
|
|
define("js/common/accordion", ["jquery"], function(require, exports, module){
|
|
|
var Slide = require("js/common/yohoui/YH.slide");
|
|
|
var $ = require("jquery");
|
|
|
|
|
|
var $contain = $('.slide-accordion');
|
|
|
var $item = $contain.find('li');
|
|
|
|
|
|
var $width = $item.width();
|
|
|
var $spn = parseInt($('.home-page').width()) === 1150 ? (120 + 5) : (102 + 5);
|
|
|
var slide;
|
|
|
|
|
|
function switchfun(to) {
|
|
|
$item.each(function(index) {
|
|
|
$(this).css('zIndex', index);
|
|
|
if (index <= to) {
|
|
|
$(this).stop().animate({
|
|
|
left: index * $spn
|
|
|
}, 400);
|
|
|
} else {
|
|
|
$(this).stop().animate({
|
|
|
left: (to) * $spn + $width + $spn * (index - to - 1)
|
|
|
}, 400);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
switchfun(0);
|
|
|
|
|
|
slide = new Slide({
|
|
|
length: 5,
|
|
|
loop: false,
|
|
|
auto: false,
|
|
|
timeout: 2,
|
|
|
index: 0
|
|
|
});
|
|
|
|
|
|
slide.on('change', function(data) {
|
|
|
switchfun(data.to);
|
|
|
});
|
|
|
|
|
|
$item.mouseover(function() {
|
|
|
slide.go($(this).index());
|
|
|
});
|
|
|
|
|
|
var Slide = require("js/common/yohoui/YH.slide");
|
|
|
var $ = require("jquery");
|
|
|
|
|
|
var $contain = $('.slide-accordion');
|
|
|
var $item = $contain.find('li');
|
|
|
|
|
|
var $width = $item.width();
|
|
|
var $spn = parseInt($('.home-page').width()) === 1150 ? (120 + 5) : (102 + 5);
|
|
|
var slide;
|
|
|
|
|
|
function switchfun(to) {
|
|
|
$item.each(function(index) {
|
|
|
$(this).css('zIndex', index);
|
|
|
if (index <= to) {
|
|
|
$(this).stop().animate({
|
|
|
left: index * $spn
|
|
|
}, 400);
|
|
|
} else {
|
|
|
$(this).stop().animate({
|
|
|
left: (to) * $spn + $width + $spn * (index - to - 1)
|
|
|
}, 400);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
switchfun(0);
|
|
|
|
|
|
slide = new Slide({
|
|
|
length: 5,
|
|
|
loop: false,
|
|
|
auto: false,
|
|
|
timeout: 2,
|
|
|
index: 0
|
|
|
});
|
|
|
|
|
|
slide.on('change', function(data) {
|
|
|
switchfun(data.to);
|
|
|
});
|
|
|
|
|
|
$item.mouseover(function() {
|
|
|
slide.go($(this).index());
|
|
|
});
|
|
|
|
|
|
slide.init();
|
|
|
});
|
|
|
define("js/common/yohoui/YH.slide", [], function(require, exports, module){
|
...
|
...
|
|