110 lines
3.2 KiB
JavaScript
110 lines
3.2 KiB
JavaScript
window.onload;
|
|
$(window).resize(wah);
|
|
|
|
function wah() {
|
|
|
|
}
|
|
|
|
$(window).scroll(function(event) {
|
|
// if ($(window).scrollTop() > 0) {
|
|
// $('.head-box').addClass('active');
|
|
// } else {
|
|
// $('.head-box').removeClass('active');
|
|
// }
|
|
if ($(window).scrollTop() > 400) {
|
|
$('.gotop').fadeIn();
|
|
} else {
|
|
$('.gotop').fadeOut();
|
|
}
|
|
})
|
|
|
|
$(window).on("load", function() {
|
|
setTimeout(function() {
|
|
$('.loading').fadeOut();
|
|
}, 4000)
|
|
})
|
|
|
|
$(function() {
|
|
|
|
$('.nav_btn').click(function() {
|
|
if ($('.nav_btn').attr('class') == 'nav_btn cur') {
|
|
$('.nav_btn').removeClass('cur');
|
|
$('.nav').removeClass('active');
|
|
$('body').css('overflow', 'inherit');
|
|
} else {
|
|
$('.nav_btn').addClass('cur');
|
|
$('.nav').addClass('active');
|
|
$('body').css('overflow', 'hidden');
|
|
}
|
|
});
|
|
|
|
$('.home-box1 .center-block li').hover(function(){
|
|
if($(this).attr('class') != 'active'){
|
|
$('.home-box1 .center-block li').removeClass('active').eq($(this).index()).addClass('active')
|
|
}
|
|
})
|
|
|
|
$('.about-box2 .top-box .fr span').removeClass('active').eq(0).addClass('active')
|
|
$('.about-box2 .lower-box').hide().eq(0).show();
|
|
$('.about-box2 .top-box .fr span').click(function(){
|
|
if($(this).attr('class') != 'active'){
|
|
$('.about-box2 .top-box .fr span').removeClass('active').eq($(this).index()).addClass('active')
|
|
$('.about-box2 .lower-box').hide().eq($(this).index()).show();
|
|
}
|
|
})
|
|
$('.about-box2 .lower-box').each(function(){
|
|
var that = $(this)
|
|
that.find('.pull-right ul li').removeClass('active').eq(0).addClass('active')
|
|
that.find('.pull-left ul li').hide().eq(0).show();
|
|
that.find('.pull-right ul li').click(function(){
|
|
if($(this).attr('class') != 'active'){
|
|
that.find('.pull-right ul li').removeClass('active').eq($(this).index()).addClass('active')
|
|
that.find('.pull-left ul li').hide().eq($(this).index()).show();
|
|
}
|
|
})
|
|
})
|
|
|
|
$('.marketing-box2 .center-block ul li').each(function(){
|
|
var that = $(this)
|
|
that.find('.top-box').click(function(){
|
|
if(that.attr('class') != 'active'){
|
|
that.addClass('active')
|
|
that.find('.top-box .pull-right').text('收起')
|
|
that.find('.lower-box').stop(true,false).slideDown()
|
|
}else{
|
|
that.removeClass('active')
|
|
that.find('.top-box .pull-right').text('展开')
|
|
that.find('.lower-box').stop(true,false).slideUp()
|
|
}
|
|
})
|
|
})
|
|
|
|
$('.about-box5 .video-box').click(function(){
|
|
$(this).find('i').fadeOut()
|
|
$(this).find('video').get(0).play()
|
|
})
|
|
|
|
|
|
$('.ewm_tc').click(function() {
|
|
$(this).fadeOut();
|
|
})
|
|
|
|
if ($(window).width() <= 768) {
|
|
$('.home-box1 .center-block li').addClass('active')
|
|
} else {
|
|
|
|
}
|
|
|
|
|
|
$(".gotop").click(function() {
|
|
var anh = $("body").offset().top;
|
|
$("html,body").stop().animate({
|
|
scrollTop: anh
|
|
}, 1000);
|
|
scrollAnh = 0;
|
|
scrollNum = 0;
|
|
});
|
|
|
|
|
|
});
|