SourceCode/jiouosdp/Content/Login/js/index.js
(完整代码) 1KB/*
* @Author: anchen
* @Date: 2015-10-14 17:36:58
* @Last Modified by: anchen
* @Last Modified time: 2015-10-19 19:24:27
*/
$(function() {
$('.navRight .dropdown>li').hover(function(){
$(this).find('.children').animate({ opacity:'show', height:'show' },200);
}, function() {
$('.children').stop(true,true).hide();
});
var $key=0;/*这个键时控制轮播图播放的顺序,开关*/
$(".box ol li").click(function(event) {
$(this).addClass('current').siblings().removeClass('current');
$(".box ul li").eq($(this).index()).stop().fadeIn(500).siblings().stop().fadeOut(500);
$key=$(this).index();
});
var timer=setInterval(autoplay, 3000);
function autoplay(){
$key++;
if($key>5){
$key=0;
}
$(".box ol li").eq($key).addClass('current').siblings().removeClass('current');
$(".box ul li").eq($key).stop().fadeIn(500).siblings().stop().fadeOut(500);
}
$(".box").hover(function() {
clearInterval(timer);
}, function() {
clearInterval(timer);/*启动定时器之前会先清除一下定时器,个人经验*/
timer=setInterval(autoplay, 3000);
});
$('.title-list li').click(function(){
var liindex = $('.title-list li').index(this);
console.log(liindex);
$(this).addClass('on').siblings().removeClass('on');
$('.product-wrap div.product').eq(liindex).fadeIn(150).siblings('div.product').hide();
var liWidth = $('.title-list li').width();
// console.log($('.title-list li').width())
$('.title .title-list p').stop(false,true).animate({'left' : liindex * liWidth + 'px'},300);
});
});
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。