// JavaScript Document $(function(){ //$(".fack ul li:last").css("background","none"); $(".fack ul li").each(function(n) { $(this).hover(function(){ $(this).children(".link").addClass("to") $(this).stop().children(".link").next(".nav_menu-bj").slideDown(600) },function(){ $(this).children(".link").removeClass("to") $(this).children(".link").next(".nav_menu-bj").stop().slideUp(200) }) }); }); jQuery(function(){ $(".fack ul li .nav_menu-bj h5 a").each(function(i){ if($(this).text().length > 5){ $(this).parents('.nav_menu-bj').addClass('widtha') } }); }); $(function() { $(".Nota5 h4:last").css("background","none"); $(".Nota5 h4").each(function(n) { $(this).hover(function(){ //p2 = $(this).index(); $(".Nota5 h4").removeClass("lp"); $(this).addClass("lp"); $(this).parents(".Nota5").siblings(".qie-box").hide(); $(".qie-box:eq("+ n +")").show(); }) }); }); jQuery(function(){ $(".time-news ul li h3").each(function(i){ if($(this).text().length > 26){ $(this).addClass('hgi') } }); }); jQuery(function(){ $(".time-news ul li").each(function(i){ $(this).parents(".time-news").find("li:last").css("border","none"); }); }); $(function(){ $(".picMarquee-left .bd ul li").hover(function(){ $(this).find(".show2").stop(true).animate({bottom:0},300); },function(){ $(this).find(".show2").stop(true).animate({bottom:-279},300); }); $(".picMarquee-left .bd ul li").hover(function(){ $(this).find(".show1").hide(); },function(){ $(this).find(".show1").fadeIn(800); }); }) $(function(){ $(window).scroll(function(){ var top = $(this).scrollTop() if (top + $(window).height() == $(document).height()) { $(".Location-bj").hide(); } if(top + $(window).height() < $(document).height() - 240){ $(".Location-bj").show(); } }); }) $(function(){ $(".taw").click(function(){ $(".Location-bj").animate({ left:"0" },600) }) $(".gban").click(function(){ $(".Location-bj").animate({ left:"-100%" },600) }) }) $(function(){ var xian1 = '
' $(".news-list ul li").each(function() { var index = $(".news-list ul li").index($(this)); var leg = $(".news-list ul li").length; if(index %5 == 4){ $(this).after(xian1) }; }); }); $(document).ready(function(){ //var bto = "" $(window).bind("scroll", function(){ var top5 = $(this).scrollTop(); // 当前窗口的滚动距离 if(top5 > 380){ $('.fix').show(); }else if(top5 + $(window).height() < $(document).height() - 10){ { $('.fix').hide(); } }; }); $('.gd-bj img').click(function(){ $('html,body').animate({scrollTop:0},'slow'); }); }); $(function(){ $(".news ul li:last").css("border","none"); $(".qh-k h4:last").css("background-image","none"); }); // ------------------------- $(function() { $(".nav2 p").each(function() { $(this).click(function() { var ul = $(this).next(".new"); if (ul.css("display") == "none") { ul.slideDown(); } else { ul.slideUp(); } }); }); $(".nav2 .set").each(function() { $(this).click(function() { var _name = $(this).attr("name"); if ($("[name=" + _name + "]").length > 1) { $("[name=" + _name + "]").removeClass("select"); $(this).addClass("select"); } else { if ($(this).hasClass("select")) { $(this).removeClass("select"); } else { $(this).addClass("select"); } } }); }); $(".nav2 li").each(function() { $(this).click(function() { var li = $(this).text(); $(this).parent(".new").prev(".set").html(li); $(this).parent(".new").hide(); $(this).parent(".new").prev("p").removeClass("select"); $(this).parents(".nav2").find(".val").val($(this).attr("data-info")); }); }); }); $(document).ready(function() { $(".sidebar li h6.on").parents("li").find(".box").attr("title","on").show(); $(".sidebar li h6.on").parent().parent("li").attr("class","on"); $(".sidebar li .box").each(function() { var box = $(this).html(); if(box == null || box.length == 0){ $(this).css("padding","0") } }); }); $(function(){ $(".sidebar li h6").each(function(n){ $(this).click(function(){ title = $(this).parent().parent().children(".box").attr("title") $(".sidebar li").removeClass("on").children(".box").attr("title","off").slideUp("slow"); if(title != "on"){ $(this).parent().parent().children(".box").attr("title","on").slideDown("slow"); $(this).parent().parent("li").addClass("on") }else{ $(this).parent().parent("li").removeClass("on") $(this).parent().parent().children(".box").attr("title","off").slideUp("slow"); } }) }); }); $(function(){ //图片是否为空或是否==0 $(".news ul li").each(function() { var src = $(this).find("img").attr("src"); if(src == "" || $(this).find("img").length==0){ $(this).addClass("noa") }else{ $(this).removeClass("noa") } }); }); $(function(){ $(".dd1 .wx").hover(function(){ $(this).next(".ewm-bj").stop().slideDown(); },function(){ $(this).next(".ewm-bj").stop().slideUp(); }); });