eY+y) + "px", "left": (e.pageX+x) + "px" }); }); $('#tab0').hide(); var url=window.location.href; if(url.indexOf("?")<=0){ url=url+"?"; } //alert(url); var first_id=$("#first_cate_id_input").val(); var cate_input_id=$("#cate_id_input").val(); if(first_id==cate_input_id){ $('#tab1').show(); } else { $('#tab0').show(); } $(".show-logo div:gt(13)").hide(); $(".btn-option-more").each(function(){ var listem=$(this).parents(".listitem"); $(this).toggle(function(){ if(listem.has('.show-logo').length>0){ $(".show-logo div:gt(13)").show(); if( $(".show-logo div").length>14){ listem.addClass("showmore"); } } else{ listem.addClass("showmore"); } $(this).find("span").text("收起"); },function(){if(listem.has('.show-logo').length>0){ $(".show-logo div:gt(13)").hide(); } listem.removeClass("showmore"); $(this).find("span").text("更多");}) }); /*多选s*/ $(".btn-choosemore").each(function(){ var listem=$(this).parents(".listitem"); $(this).click(function(){ listem.addClass("chosemore showmore"); $(this).prev().find("span").text("收起"); }) }); /*回单选s*/ $(".btn-reset-choose").click(function(){ $(this).parents(".listitem").removeClass("chosemore showmore"); $(this).parent().next(".btn-option-more").find("span").text("更多") }) $(".show-logo div").hover(function(){$(this).find("span").addClass("border")},function(){$(this).find("span").removeClass("border")}) $(".btn-filter-clear").live("click", function () { $(this).prevAll().remove(); $(this).hide(); $(".listitem-link").removeClass("cur"); $(".option-all").addClass("cur"); if(url.indexOf("?cate_id=")>0){ var url1=url.substr(0,url.indexOf("&")+1); }else{ var url1=url.substr(0,url.indexOf("?")); } window.location.href=url1; }); });