', okValue: '确定', ok: function () { $.post("/callme.html", {tel:$("#tel").val()}, function (result) {alert(result.msg);}, "json"); return false; } }); d.showModal(); }); var signin = true; var url = ''; $('#like2').click(function(){ if(signin){ $.post('http://4g.ynsgkyy.com/index.php/weixin/article/praise.html',{'article_id':'10405'},function(json){ if(json.error=='0'){ $('#likeNum2').html(parseInt($('#likeNum2').html())+1); $('#like2 .icon_praise_gray').css('background-position','0 -18px'); signin = false; }else{ signin = false; } },'json'); } }); $('#back').click(function(){ location.href = $('.rt-bk a').attr('href'); }); $('#js_view_source').click(function(){ if(url) location.href = url; });});$(".search").bind("click", function () { $("#search-over").fadeIn(50); $("#search-warmp").show(); $("html,body").animate({scrollTop:0}, 200); searchBtn(); $("#search-tab .search-tab-hd li").each(function (i) {$(this).click(function(){$(this).addClass("on").siblings().removeClass("on");$("#search-tab .search-tab-con").eq(i).show().siblings().hide();}) }); $("#search-over").bind("touchmove", function (e){e.preventDefault()}, false); }); $("#search-clear").bind("click", function () { $("#search-button").text("取消"); $("#search-button").removeClass("search-go").addClass("search-cancel"); $("#keywords").val(""); $(this).hide(); }); $("#keywords").bind("keyup input keywords", function () { searchBtn(); }); $("#search-button").bind("click", function () { if ($(this).hasClass("search-go")) { searchGo(); } else { searchCancle(); } }); $("#history .search-change").click(function () { clearCookie('history'); getHistory("history", $("#history p")); }); function searchBtn() { if ($("#keywords").val() == "") { $("#search-clear").hide(); $("#search-button").text("取消"); $("#search-button").removeClass("search-go"); } else { $("#search-clear").show(); $("#search-button").text("搜索"); $("#search-button").addClass("search-go"); } } function searchCancle() { $("#search-over").fadeOut(50); $("#search-warmp").hide(); } function searchGo() { setHistory("history", $("#keywords").val()); getHistory("history", $("#history p")); var k = $("#keywords").val(); var url = "/seach/index.html?keyword=" + k; window.location = url; } getHistory("history", $("#history p"));