$(function(){ var url = window.location.href; var div = $("#view_count"); if(div.length>0){ $.ajax({ type: "POST", url: "/app/count.php", dataType: "json", data: {"action":"count","url":url}, beforeSend: function(){}, success: function(json){ if(json.success==1){ div.text(json.num); }else{ return false; } } }); } }); var key = document.getElementById("key"); function searchInfo() { var base = $('head').data('base'); if (key.value) { location.href = base + "search.php?key=" + key.value; } else { alert('璇疯緭鍏ユ偍瑕佹悳绱㈢殑鍏抽敭璇嶏紒'); } } key.addEventListener('keypress', function(event) { var keycode = event.keycode || event.which; if (keycode == "13") { searchInfo(); } }); function searchLink(el) { var href = $(el).attr("href"); location.href = href ? href : "/search.php?key=" + $(el).html(); } jQuery(".news").slide({titCell:".news_t ul li",mainCell:".news_m",effect:"fade",autoPlay:false,delayTime:700}); $(function() { $(".ys li").hover(function() { $(this).find('p').show(); },function(){ $(this).find('p').hide(); }) $(".plan_m li").hover(function() { $(this).find('.a_bg').show(); $(this).find('span').hide(); },function(){ $(this).find('.a_bg').hide(); $(this).find('span').show(); }) }) $(".header h1,.footer h2").fadeThis({speed:800}); $(function() { $(window).scroll(function() { if ($(window).scrollTop() > 100) { $(".top").fadeIn(1500); } else { $(".top").fadeOut(1500); } }) }); //褰撶偣鍑昏烦杞摼鎺ュ悗锛屽洖鍒伴〉闈㈤《閮ㄤ綅缃 $(".top").hover(function() { $('body,html').animate({ scrollTop: 0 }, 1000); return false; }); //$(".close").hover(function () { // $('.kefu').animate({ right:"0",opacity:0},1000,function(){ // $(this).css({display:"none"}) // }); // $('.ke_close').animate({ right:"10",opacity:1},1000,function(){ // $(this).css({display:"block"}) // }); // return false; //}); $(".ke_close").hover(function(){ $('.kefu').show(); },function(){ $('.kefu').hide(); }); // $(".close").hover(function() { // $('.kefu').animate({ // right: "0", // opacity: 0 // }, 1000, function() { // $(this).css({ // display: "none" // }) // }); // $('.ke_close').animate({ // right: "10", // opacity: 1 // }, 1000, function() { // $(this).css({ // display: "block" // }) // }); // return false; // });