42 lines
1.5 KiB
JavaScript
42 lines
1.5 KiB
JavaScript
// $(window).scroll(function () {
|
|
// var wid = $(document).width();
|
|
// if (wid > 1200) {
|
|
// if ($(document).scrollTop() > 50) {
|
|
// if ($(".zh_top").hasClass("white")) {
|
|
// } else {
|
|
// $(".zh_top").addClass("white");
|
|
// $(".zh_head").animate({"height": "50px"});
|
|
// $(".zh_nav").animate({"height": "70px"});
|
|
// }
|
|
// }
|
|
// ;
|
|
// if ($(document).scrollTop() < 50) {
|
|
// if ($(".zh_top").hasClass("white")) {
|
|
// $(".zh_top").removeClass("white");
|
|
// $(".zh_head").animate({"height": "60px"});
|
|
// $(".zh_nav").animate({"height": "100px"});
|
|
// }
|
|
// }
|
|
// }
|
|
// })
|
|
// $(".zh_nav_btn").click(function () {
|
|
// if ($(".nav_con").hasClass("open")) {
|
|
// $(".nav_con").removeClass("open").slideUp();
|
|
// } else {
|
|
// $(".nav_con").addClass("open").slideDown();
|
|
// }
|
|
// })
|
|
|
|
$(window).scroll(function() {
|
|
if ($(document).scrollTop() > 5) {
|
|
$(".zh_top").animate({}, 500).addClass("blackbg");
|
|
// $(".nav_con a").attr('style', 'color:#000')
|
|
// $(".zh_hr a, .zh_hr span").attr('style', 'color:#000')
|
|
// $(".swiper").attr('style', 'color:#000')
|
|
} else {
|
|
$(".zh_top").animate({}, 500).removeClass("blackbg");
|
|
// $(".nav_con a").attr('style', 'color:#fff')
|
|
// $(".zh_hr a, .zh_hr span").attr('style', 'color:#fff')
|
|
// $(".swiper").attr('style', 'color:#fff')
|
|
}
|
|
}) |