0123
parent
0abfe65a4f
commit
691a388ea5
114
js/javascript.js
114
js/javascript.js
|
@ -31,115 +31,5 @@ jQuery(function($){
|
||||||
});
|
});
|
||||||
|
|
||||||
// 回到顶部
|
// 回到顶部
|
||||||
$('#toTop').click(function(){$('html,body').animate({scrollTop:$('#top').offset().top}, 600);});
|
$('.toTop').click(function(){$('html,body').animate({scrollTop:$('#top').offset().top}, 1000);});
|
||||||
|
});
|
||||||
//暂停&播放
|
|
||||||
$('.experience-audio>.play-btn').click(function() {
|
|
||||||
let audio = $('.experience-audio>.play-btn');
|
|
||||||
for (let i=0;i<audio.length;i++){
|
|
||||||
audio.next()[i].pause();
|
|
||||||
}
|
|
||||||
if(!$(this).hasClass("active")){
|
|
||||||
$('.experience-audio>.play-btn').removeClass("active");
|
|
||||||
$(this).addClass("active");
|
|
||||||
$(this).next()[0].play();//播放
|
|
||||||
}else{
|
|
||||||
$(this).removeClass("active");
|
|
||||||
$(this).next()[0].pause();//暂停
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 产品锚点
|
|
||||||
$('.onExperience').click(function(){$('html,body').animate({scrollTop:$('.experience-bg').offset().top}, 600);});
|
|
||||||
$('.onAdvantage').click(function(){$('html,body').animate({scrollTop:$('.advantage-bg').offset().top}, 600);});
|
|
||||||
$('.onScene').click(function(){$('html,body').animate({scrollTop:$('.scene-bg').offset().top}, 600);});
|
|
||||||
$('.onPrice').click(function(){$('html,body').animate({scrollTop:$('.price').offset().top}, 600);});
|
|
||||||
$('.onDeveloper').click(function(){$('html,body').animate({scrollTop:$('.developer-bg').offset().top}, 600);});
|
|
||||||
|
|
||||||
// 应用场景切换
|
|
||||||
$(".scene-list li").eq(0).addClass("cur");
|
|
||||||
$('.scene-item li').hover(function() {
|
|
||||||
$(".scene-item li").eq($(this).index()).addClass("active").siblings().removeClass('active');
|
|
||||||
$(".scene-list li").eq($(this).index()).addClass("cur").siblings().removeClass('cur');
|
|
||||||
});
|
|
||||||
|
|
||||||
// 关于我们
|
|
||||||
$(".about-content-bg>div").eq(0).addClass("cur");
|
|
||||||
$('.about-nav-item li').click(function() {
|
|
||||||
$(".about-nav-item li").eq($(this).index()).addClass("active").siblings().removeClass('active');
|
|
||||||
$(".about-content-bg>div").eq($(this).index()).addClass("cur").siblings().removeClass('cur');
|
|
||||||
});
|
|
||||||
|
|
||||||
// 加入我们
|
|
||||||
$(".join-class li").eq(0).addClass("cur");
|
|
||||||
$(".join-list li").eq(0).addClass("cur");
|
|
||||||
$(".join-list li").eq(0).find(".join-list-item").eq(0).addClass("active");
|
|
||||||
$(".join-list li").eq(1).find(".join-list-item").eq(0).addClass("active");
|
|
||||||
$('.join-item li').click(function() {
|
|
||||||
$(".join-item li").eq($(this).index()).addClass("active").siblings().removeClass('active');
|
|
||||||
$(".join-class li").eq($(this).index()).addClass("cur").siblings().removeClass('cur');
|
|
||||||
$(".join-list li").eq($(this).index()).addClass("cur").siblings().removeClass('cur');
|
|
||||||
});
|
|
||||||
$('.join-class li span').click(function() {
|
|
||||||
$(".join-class li.cur span").eq($(this).index()).addClass("active").siblings().removeClass('active');
|
|
||||||
$(".join-list li.cur .join-list-item").eq($(this).index()).addClass("active").siblings().removeClass('active');
|
|
||||||
});
|
|
||||||
|
|
||||||
// 判断价格图片是否为空
|
|
||||||
if(!$('.price img').attr('src')){
|
|
||||||
$(".price").html("<span>定价图片后台上传</span>");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 手机导航按钮
|
|
||||||
$('.head .head-btn').click(function() {
|
|
||||||
if ($('.head .head-btn').attr('class') == 'head-btn cur') {
|
|
||||||
$('.head .head-btn').removeClass('cur');
|
|
||||||
$('.head .nav').removeClass('active');
|
|
||||||
$('.head .nav-bg').removeClass('active');
|
|
||||||
} else {
|
|
||||||
$('.head .head-btn').addClass('cur');
|
|
||||||
$('.head .nav').addClass('active');
|
|
||||||
$('.head .nav-bg').addClass('active');
|
|
||||||
$('.head .logo').addClass('active');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('.head .nav-bg').click(function() {
|
|
||||||
$(this).removeClass('active');
|
|
||||||
$('.head .head-btn').removeClass('cur');
|
|
||||||
$('.head .nav').removeClass('active');
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 控制hover背景
|
|
||||||
// $('.nav>li').eq(1).mouseover(function() {
|
|
||||||
// $(".nav-bg.wap-show").show();
|
|
||||||
// }).mouseout(function() {
|
|
||||||
// $(".nav-bg.wap-show").hide();
|
|
||||||
// });
|
|
||||||
// $('.nav>li').eq(2).mouseover(function() {
|
|
||||||
// $(".nav-bg.wap-show").show();
|
|
||||||
// }).mouseout(function() {
|
|
||||||
// $(".nav-bg.wap-show").hide();
|
|
||||||
// });
|
|
||||||
// $('.nav>li').eq(3).mouseover(function() {
|
|
||||||
// $(".nav-bg.wap-show").show();
|
|
||||||
// }).mouseout(function() {
|
|
||||||
// $(".nav-bg.wap-show").hide();
|
|
||||||
// });
|
|
||||||
// $('.nav>li').eq(4).mouseover(function() {
|
|
||||||
// $(".nav-bg.wap-show").show();
|
|
||||||
// }).mouseout(function() {
|
|
||||||
// $(".nav-bg.wap-show").hide();
|
|
||||||
// });
|
|
||||||
|
|
||||||
// $('.side-nav-item>li').mouseover(function() {
|
|
||||||
// $(".nav-bg.wap-show").show();
|
|
||||||
// }).mouseout(function() {
|
|
||||||
// $(".nav-bg.wap-show").hide();
|
|
||||||
// });
|
|
||||||
// $('.side-nav-item>li').eq(4).mouseover(function() {
|
|
||||||
// $(".nav-bg.wap-show").hide();
|
|
||||||
// });
|
|
||||||
})
|
|
Loading…
Reference in New Issue