/* 搜索提示 */ function checksearch(the) { if ($.trim(the.key.value) == '') { alert('请输入关键字'); the.key.focus(); the.key.value = ''; return false } if ($.trim(the.key.value) == '请输入关键字') { alert('请输入关键字'); the.key.focus(); the.key.value = ''; return false } } /* 更多加载 */ var starthref; $(function() { $(".c-moreajax a").click(function() { var href = $(this).attr("href"); starthref = href; if (href != undefined) { $.ajax({ type: "get", cache: false, url: starthref, success: function(data) { var $result = $(data).find(".c-ajax"); $(".c-commentajax").append($result); var newhref = $(data).find(".c-moreajax a").attr("href"); if (newhref != "") { $(".c-moreajax a").attr("href", newhref) } else { $(".c-moreajax").html('') } } }) } return false }) }); /* 浮动工具 */ $(".c-tools ul li").hover(function() { $(this).find("span").stop().fadetoggle(10) }); /* 返回顶部 */ $(".top-ico").click(function() { $("body,html").stop().animate({ scrolltop: 0 }, 100); }); /* 通用下拉 */ $(function() { $(".nav li").hover(function() { $(this).find(".common-nav2").stop(true,true).slidedown("fast"); }), $(".nav li").mouseleave(function() { $(this).find(".common-nav2").stop(true,true).slideup("fast"); }); });