无线雷达Easy_WIFI_Radar_pro_1.0_免费无线上网

源代码在线查看: shop.js

软件大小: 2895 K
上传用户: wy50094777
关键词: Easy_WIFI_Radar_pro 1.0 无线 雷达
下载地址: 免注册下载 普通下载 VIP

相关代码

				(function(o){function s(b){var a=YAHOO.util,e=a.Dom;a=a.Event;if(b=e.get(b)){var f=b.parentNode,h=function(){""!==b.value?e.addClass(f,"focus"):e.removeClass(f,"focus")};a.on(b,"focus",function(){e.addClass(f,"focus")});a.on(b,"blur",h);setTimeout(h,0)}}function v(b){if(b=c.get(b)){b.onmouseenter=function(){c.addClass(this,"hover")};b.onmouseleave=function(){c.removeClass(this,"hover")}}}function w(b){if(b=c.get(b)){var a=b["shop-q"],e,f;if(a){p.on(b.getElementsByTagName("button"),"click",function(){var j=
				this.getAttribute("data-action");if(j){b.action=j;b.submit()}});try{TShop.use("tb-core",function(){new KISSY.Suggest(a,"http://suggest.taobao.com/sug",{resultFormat:"\u7ea6%result%\u4e2a\u5b9d\u8d1d"})})}catch(h){if(!TB.Suggest)if(KISSY.Suggest)TB.Suggest=KISSY.Suggest;else return;new TB.Suggest(a,"http://suggest.taobao.com/sug",{resultFormat:"\u7ea6%result%\u4e2a\u5b9d\u8d1d"})}if(o.g_config&&(f=o.g_config.appId)){e=1===f?"item":16===f?"rate":"store";b.source&&setTimeout(function(){b.source.value=e},0)}}}}function x(){if(q&&q===6)if(!c.hasClass("content",
				"head-expand")){var b=c.get("hd");b&&b.offsetHeight>250&&c.setStyle(b,"height","250px")}}TB.namespace("Shop");var r=YAHOO.util,c=r.Dom,p=r.Event,y=o.document,q=YAHOO.env.ua.ie,n="expand",m="collapse",z=function(){var b=YAHOO.util.Dom,a=YAHOO.util.Event,e={titleClass:"tb-fl-title",contentClass:"tb-fl-content",expandClass:"tb-fl-expand",collapseClass:"tb-fl-collapse",multiExpand:true};return{decorate:function(f,h){f=b.get(f);h=YAHOO.lang.merge(e,h||{});var j={},l=b.getElementsByClassName(h.titleClass,
				"*",f);j.expandAll=function(){l.forEach(j.expand)};j.collapseAll=function(){l.forEach(j.collapse)};j.expand=function(g){h.multiExpand||l.filter(function(i){i=b.getNextSibling(i);return!(b.hasClass(i,h.contentClass)&&b.isAncestor(i,g))}).forEach(j.collapse);b.addClass(g.parentNode,h.expandClass);b.removeClass(g.parentNode,h.collapseClass);var d=b.getNextSibling(g);b.hasClass(d,h.contentClass)&&(new YAHOO.util.Anim(d,{height:{to:d.scrollHeight}},0.25,YAHOO.util.Easing.easeOutStrong)).animate()};j.collapse=
				function(g){b.addClass(g.parentNode,h.collapseClass);b.removeClass(g.parentNode,h.expandClass);g=b.getNextSibling(g);b.hasClass(g,h.contentClass)&&(new YAHOO.util.Anim(g,{height:{to:0}},0.25)).animate()};a.on(l,"click",function(g){var d=a.getTarget(g);if(d===this||b.isAncestor(this,d)&&d.nodeName!=="IMG"&&d.nodeName!=="A"){j[b.hasClass(this.parentNode,h.collapseClass)?"expand":"collapse"](this);a.stopEvent(g)}});return j}}}();TB.Shop.Category=function(){function b(){var a=c.get("content").getAttribute("data-cat");
				if(!(null===a||"J_Cat"===a||"J_Cat0"===a))if(a=c.get(a))if(c.hasClass(a,"cat"))c.hasClass(a,m)||c.replaceClass(a,m,n);else{a=a.parentNode.parentNode;!c.hasClass(a,m)||c.replaceClass(a,m,n)}}return{init:function(){c.getElementsByClassName("cats","ul","content").forEach(function(a){z.decorate(a,{titleClass:"cat-hd",contentClass:"cat-bd",expandClass:n,collapseClass:m,multiExpand:true})});b()}}}();TB.Shop.Menu=function(){var b=c.get("J_HeadCatsPopup");if(b){c.get("content").appendChild(b);TB.widget.SimplePopup.decorate("J_HeadCats",
				b,{position:"bottom",effect:"fade",delay:0.2,onShow:function(){c.addClass(this.trigger,"hover")},onHide:function(){c.removeClass(this.trigger,"hover")}})}};TB.Shop.ListFilter=function(){var b=c.get("J_HesperCats");if(b){var a=c.get("bd");p.on("J_HesperCatsTrigger","click",function(e){p.preventDefault(e);c.hasClass(b,n)?c.replaceClass(b,n,m):c.replaceClass(b,m,n);if(q>0)a.style.zoom=a.style.zoom==="1"?"100%":"1"})}};TB.Shop.Slider=function(){c.getElementsByClassName("J_Slider","div","content").forEach(function(b){var a=
				b.getAttribute("data-type")||"scroll";TB.widget.SimpleSlide.decorate(b,{triggersClass:"lst-trigger",currentClass:"current",eventType:"mouse",effect:a})})};TB.Shop.Scroll=function(){var b=YAHOO.util,a=b.Dom,e=b.Event,f=YAHOO.lang,h={elem:null,itemsCN:"item",triggerType:"a",prevTrigger:"J_Prev",nextTrigger:"J_Next",triggerEvent:"click",width:0,auto:true},j={BEFOREPREV:"beforePrev",PREV:"prev",BEFORENEXT:"beforeNext",NEXT:"next"},l=function(g){this.config=f.merge(h,g||{});for(var d in j)this.createEvent(j[d]);
				this._init()};f.augmentProto(l,b.EventProvider);f.augmentObject(l.prototype,{beforePrev:function(){this.fireEvent("beforePrev");this._stopScroll||this.prev()},prev:function(){this._stopScroll=false;this._scroll(-1);this.fireEvent("prev")},beforeNext:function(){this.fireEvent("beforeNext");this._stopScroll||this.next()},next:function(){this._stopScroll=false;this._scroll(1);this.fireEvent("next")},stop:function(){return this._stopScroll=true},updateState:function(){var g=this.items[this.num],d=this.config,
				i=this.prevTrigger,k=this.nextTrigger,t=a.getPreviousSibling(g),u=a.getNextSibling(g);null===t||!a.hasClass(t,d.itemsCN)?a.addClass(i,"disabled"):a.removeClass(i,"disabled");null===u||!a.hasClass(u,d.itemsCN)?a.addClass(k,"disabled"):a.removeClass(k,"disabled");a.removeClass(this.items,"J_Current");a.addClass(g,"J_Current");if(this.items.length>3){a.addClass(this.items,"hidden");a.removeClass([this.items[this.num-1],g,this.items[this.num+1]],"hidden")}a.removeClass(i.concat(k),"ing");this._stopScroll=
				false},_stopScroll:false,_scroll:function(g){var d=this.config,i=a.getElementsByClassName("J_Current","ul",d.elem),k;if(i&&i[0])i=-1===g?a.getPreviousSibling(i[0]):i[0];k=parseFloat(a.getStyle(i,"margin-left"));d={marginLeft:{form:k,to:-g*d.width+k}};this.num+=g;(new b.Anim(i,d,0.5)).animate();this.updateState()},_init:function(){var g=this,d=this.config,i=d.triggerType;d.elem=a.get(d.elem);if(d.elem){this.items=a.getElementsByClassName(d.itemsCN,"ul",d.elem);if(this.items.length!==0){this.prevTrigger=
				a.getElementsByClassName(d.prevTrigger,i,d.elem);this.nextTrigger=a.getElementsByClassName(d.nextTrigger,i,d.elem);d.width=this.items[0].offsetWidth*2;this.config=d;this.num=0;this.updateState();a.removeClass(this.prevTrigger,"hidden");a.removeClass(this.nextTrigger,"hidden");e.on(this.prevTrigger,d.triggerEvent,function(k){e.preventDefault(k);if(!(a.hasClass(this,"disabled")||a.hasClass(this,"ing"))){a.addClass(this,"ing");g.beforePrev()}});e.on(this.nextTrigger,d.triggerEvent,function(k){e.preventDefault(k);
				if(!(a.hasClass(this,"disabled")||a.hasClass(this,"ing"))){a.addClass(this,"ing");g.beforeNext()}})}}}});return l}();TB.Shop.Recommend=function(){var b=function(a){for(var e=[],f=0,h=a.length;f				LI.replace(/%PIC/,a[f].pic);LI=LI.replace(/%TITLE/,a[f].title);LI=LI.replace(/%PRICE/,a[f].price);e[f]=LI}return e.join("")};return{Scroll:null,add:function(a){if(a.length){var e=y.createElement("ul"),f=this.Scroll.items[this.Scroll.items.length-1];e.className="shop-list";e.innerHTML=b(a);c.insertAfter(e,f);this.Scroll.items[this.Scroll.items.length]=e;this.Scroll.next()}else{alert("\u5df2\u7ecf\u6ca1\u6709\u66f4\u591a\u76f8\u5173\u5b9d\u8d1d\u4e86\uff01");this.Scroll.updateState();c.addClass(this.Scroll.nextTrigger,"no-get")}},init:function(a){this.Scroll=
				new TB.Shop.Scroll(a);this.Scroll.subscribe("beforeNext",function(){var e=this.items[this.num],f=this.nextTrigger[0];c.getNextSibling(e);if(!c.hasClass(f,"no-get"))if(null===c.getNextSibling(e)){e=a.elem.getAttribute("data-url");f=a.elem.getAttribute("data-page")||0;this.stop();f=f*1+1;e=e+(-1==e.indexOf("?")?"?":"&")+"page="+f+"&t="+ +new Date;r.Get.script(e,{charset:"gbk"});a.elem.setAttribute("data-page",f)}});this.Scroll.subscribe("next",function(){c.hasClass(this.nextTrigger[0],"no-get")||c.removeClass(this.nextTrigger,
				"disabled")});c.removeClass(this.Scroll.nextTrigger,"disabled")}}}();TB.Shop.fire=function(){x();s("J_ShopSKey");s("shop-q");w("J_TBSearchForm");v("shop-info");TB.Shop.Slider();TB.Shop.Category.init();TB.Shop.ListFilter();TB.Shop.Menu();var b=c.getElementsByClassName("item-recommend","div","content");b&&b[0]&&TB.Shop.Recommend.init({elem:b[0],itemsCN:"shop-list"});c.get("shop-rank")&&TB.widget.SimplePopup.decorate("shop-rank","shop-rank-popup",{autoFit:false,eventType:"mouse",disableClick:false})}})(window);
				YAHOO.util.Event.onDOMReady(function(){TB.Shop.fire()});
							

相关资源