好憂傷好憂傷,想本身加進js代碼整理淘寶內衣店鋪,實現技術與商業的結合,但是淘寶姐姐竟然過濾掉我辛辛苦苦排版的js,我要推廣淘寶店鋪,又不想燒錢給人家UED團隊。javascript
過濾掉後,去百度了下,據說淘寶把js支持關了,好憂傷好憂傷。css
求有經驗者教導,怎麼能本身寫代碼,實如今淘寶頁面的輪播,又不被淘寶過濾掉,又不用交錢呢?html
謝謝啦!java
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="keywords" content="JS代碼,jQuery特效,幻燈片,焦點圖" /> <title>春夏來臨,碰見最純真的本身,關愛心裏,聽見本身原始的呼喚.....</title> <style> <!-- /* jQuery jcImgScroll css */ .jcImgScroll { position:relative; height:600px; } //相對位置 .jcImgScroll li { border:1px solid #ccc; } .jcImgScroll li a { background:#fff; display:block; height:600px; } .jcImgScroll li.loading a { background:#fff url(img/loading.gif) no-repeat center center;} .jcImgScroll li img,.jcImgScroll li,.jcImgScroll em,.jcImgScroll dl { display:none; border:0 none;} .jcImgScroll em.sPrev { background:url(http://img04.taobaocdn.com/imgextra/i4/25245440/T2OP6ZXzBXXXXXXXXX-25245440.png) no-repeat left center; } .jcImgScroll em.sNext { background:url(http://img04.taobaocdn.com/imgextra/i4/25245440/T2JLv0XvXXXXXXXXXX-25245440.png) no-repeat right center;} .jcImgScroll dl dd { background:url(http://img03.taobaocdn.com/imgextra/i3/25245440/T27xLZXz8XXXXXXXXX-25245440.png) no-repeat 0 bottom; text-indent:-9em; } .jcImgScroll dl dd:hover,.jcImgScroll dl dd.curr { background-position:0 0; } --> </style> <script type="text/javascript" src="http://www.webskys.com/skin/tomato/js/jquery.js"></script> <script language="javascript" type="text/javascript"> //js/jQuery-easing.js jQuery.extend( jQuery.easing, { easeInQuad: function (x, t, b, c, d) { return c*(t/=d)*t + b; }, easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; }, easeInOutQuad: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; }, easeInCubic: function (x, t, b, c, d) { return c*(t/=d)*t*t + b; }, easeOutCubic: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t + 1) + b; }, easeInOutCubic: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; }, easeInQuart: function (x, t, b, c, d) { return c*(t/=d)*t*t*t + b; }, easeOutQuart: function (x, t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; }, easeInOutQuart: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; }, easeInQuint: function (x, t, b, c, d) { return c*(t/=d)*t*t*t*t + b; }, easeOutQuint: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t*t*t + 1) + b; }, easeInOutQuint: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b; }, easeInSine: function (x, t, b, c, d) { return -c * Math.cos(t/d * (Math.PI/2)) + c + b; }, easeOutSine: function (x, t, b, c, d) { return c * Math.sin(t/d * (Math.PI/2)) + b; }, easeInOutSine: function (x, t, b, c, d) { return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; }, easeInExpo: function (x, t, b, c, d) { return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; }, easeOutExpo: function (x, t, b, c, d) { return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; }, easeInOutExpo: function (x, t, b, c, d) { if (t==0) return b; if (t==d) return b+c; if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; }, easeInCirc: function (x, t, b, c, d) { return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; }, easeOutCirc: function (x, t, b, c, d) { return c * Math.sqrt(1 - (t=t/d-1)*t) + b; }, easeInOutCirc: function (x, t, b, c, d) { if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; }, easeInElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; }, easeOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; }, easeInOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; }, easeInBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*(t/=d)*t*((s+1)*t - s) + b; }, easeOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; }, easeInOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; }, easeInBounce: function (x, t, b, c, d) { return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; }, easeOutBounce: function (x, t, b, c, d) { if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b; } else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; } else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; } else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; } }, easeInOutBounce: function (x, t, b, c, d) { if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; } });</script> <script language="javascript" type="text/javascript"> //js/jQuery-jcImgScroll.js ;(function($){ $.fn.jcImgScroll = function(options) { var defaults = { speed : 400, width : 618, height : 342, offsetX : 100, setZoom : .7, loadClass : "loading", position:"center", count :5, arrow : { width:110, height:342, x:20, y:0 }, NumBtn : false, setNumBtn : { width : 19, height : 18, x : 0, y : 362 }, title:true, setTitle : { height:35, border:8, bgColor:"#6ba600", color:"#fff", padding:20, opacity:.8 } }; var options = $.extend(defaults,options); return this.each(function() { var _SELF = $(this), _arrData = [], _IDX = 0, _CENTER = 0, $IMGLIST = $("a",_SELF), $IMGWRAP = $("ul",_SELF), $IMGWRAPLIST = $("li",$IMGWRAP), fnGetIndexArr = function(index,len){ // 當前索引,長度 var arrCurrIdx = [index]; for(b=0;b<=len;b++){ arrCurrIdx.push(index+(b+1)); arrCurrIdx.unshift(index-(b+1)<0?99:index-(b+1)); }; return arrCurrIdx; }, setSize = function(Dom,l,t,w,h,z,s){ Dom.show() .css("z-index",z) .animate({"top":t,"left":l,"height":h,"width":w},s); }; //初始化DOM對象 object = function(length){ this.length = length; this.setNum = options.setNumBtn; this.NumBtnDom = function(list,w,h,l,t){ return "<dl style=\"z-index:11;width:"+w+"px;height:"+h+"px;position:absolute;left:"+l+"px;top:"+t+"px;\">"+ list +"<dl>"; }; this.arrow = function(l,r,w,h,x,y){ return "<em class=\"sPrev\" id=\"sPrev\" style=\"position:absolute;cursor:pointer;z-index:10;width:"+w+"px;height:"+h+"px;left:"+(l-w-x)+"px;\"></em><em class=\"sNext\" id=\"sNext\" style=\"position:absolute;cursor:pointer;z-index:10;width:"+w+"px;height:"+h+"px;left:"+(r+x)+"px;top:"+y+"px;\"></em>"; }; this.hoverDom = function(t,w,h,b,bg,p,c,lh){ return "<div style=\"display:none;cursor:pointer;border:"+b+"px solid "+bg+";width:"+(w-b*2)+"px;height:"+(h-b*2)+"px;position:absolute;z-index:1;\"></div><b style=\"display:none;padding:0 "+p+"px;width:"+(w-p*2-b*2)+"px;color:"+c+";text-shadow:none;background:"+bg+";position:absolute;z-index:2;left:"+b+"px;bottom:"+b+"px;height:0px;overflow:hidden;line-height:"+(lh+5)+"px;\">"+ t +"</b>"; }; }; //初始化獲取DOM數據 object.prototype.Initial = function(callback){ if(options.count > this.length) { //this.length alert("\"Count\" parameter can not be greater than the total number of pictures, you must base !"); return false; } else if(options.count < 0) { alert("\"Count\" parameter can not be negative, you must base !"); return false; } else if(options.count%2 === 0) { alert("\"Count\" parameter must base !"); return false; }; this.arrNumList = []; this.arrImgObj = []; this.arrData = []; this.centerIdx = Math.round(this.length/2)-1; this.centerCount = Math.floor(options.count/2)-1, _IDX = this.centerIdx; _CENTER = this.centerCount; this.indexArr = fnGetIndexArr(this.centerIdx,this.centerCount); //獲取當前索引組 //console.log(this.indexArr) $IMGWRAP.css({"position":"relative","width":options.width,"height":options.height,"margin":"0 auto"}); var a=null,b=null,c=null,sTmpDD=null,t=2,t2=this.centerCount+1, CenIdxArr = this.indexArr[this.centerCount+1], wrapL = $IMGWRAP.offset().left, wrapR = $IMGWRAP.offset().left+options.width, setPos = function(mode,height){ var nPos = null; switch(mode){ case "top" : nPos = 0; break; case "center" : nPos = (options.height - height)*0.5; break; case "bottom" : nPos = options.height - height; break; default : alert("Parameters \"position\" Error, \"top\", \"center\", \"bottom\" !") }; return nPos; }; for(a=0;a<this.length;a++){ var othis = $IMGWRAPLIST.eq(a), olist = othis.find("a"), sPath = olist.attr("path"), sTitle = olist.attr("title"); othis.addClass(options.loadClass) .css({ "width":options.width, "height":options.height, "position":"absolute", "display":"none", "overflow":"hidden", "z-index":0 }); //建立圖片對象 oImg = new Image(); oImg.src = sPath; oImg.title = sTitle; oImg.width = options.width; oImg.height = options.height; this.arrImgObj.push(oImg); //顯示初始化 for(c=0;c<options.count;c++){ if(a===this.indexArr[c]){ var zindex = a>CenIdxArr?a-t:a, tmp = a>CenIdxArr?a-this.centerIdx:t2, //核心索引 width = Math.round(options.width/tmp*options.setZoom), height = Math.round(options.height/tmp*options.setZoom), top = Math.round(setPos(options.position,height)) left = Math.round(options.offsetX*tmp); //console.log(tmp) if(a<CenIdxArr){ t2-=1; left = left * -1; }; if(a>CenIdxArr){ t+=2; left = (options.width-width)+left; }; if(a==CenIdxArr){ othis.addClass("select"); width = options.width; height = options.height; left = 0; top = 0; }; setSize(othis,left,top,width,height,zindex,options.speed*1.5); this.arrData.push([left,top,width,height,zindex]); break; }; }; //輸出標題Dom if(options.title){ othis.prepend(this.hoverDom(sTitle, options.width, options.height, options.setTitle.border, options.setTitle.bgColor, options.setTitle.padding, options.setTitle.color, options.setTitle.height )) .find("div") .css("opacity",0) .end() .find("b") .css("opacity",0); }; //獲取數字按鈕 if(options.NumBtn){ var NumStyle = "cursor:pointer;float:left;height:"+this.setNum.height+"px;width:"+this.setNum.width+"px;overflow:hidden;"; if(this.centerIdx === a){ sTmpDD = "<dd class=\"curr\" style=\""+ NumStyle +"\">"+ a +"</dd>"; } else { sTmpDD = "<dd style=\""+ NumStyle +"\">"+ a +"</dd>"; }; this.arrNumList.push(sTmpDD); }; }; //輸出箭頭按鈕 _SELF.prepend(this.arrow(wrapL,wrapR,options.arrow.width,options.arrow.height,options.arrow.x,options.arrow.y)) .find("em") .show(0); //輸出數字按鈕 if(this.arrNumList.length !=0 ){ var NumListDom = this.arrNumList.join(""), NumWrapWidth = this.setNum.width*this.length, NumWrapHeight = this.setNum.height, NumWrapLeft = (_SELF.width()-NumWrapWidth)*0.5 + this.setNum.x; _SELF.append(this.NumBtnDom(NumListDom,NumWrapWidth,NumWrapHeight,NumWrapLeft,this.setNum.y)) .find("dl") .show(); }; callback.call(this,this.arrImgObj); return this.arrData; }; //調用對象 、操做 var o = new object($IMGLIST.length); _arrData = o.Initial(function(arrImg){ for(var b in arrImg){ arrImg[b].tmp = b; arrImg[b].onload = function(){ var idx = this.tmp, $thisImg = $IMGLIST.eq(idx); $thisImg.html($(arrImg[idx])) .find("img") .fadeIn(600) .parents("li") .removeClass(options.loadClass); }; }; //釋放對象 (function(obj){ var d=null,arg = arguments,len=arg.length; for(d=1;d<len;d++){ delete obj[arg[d]]; }; }(this,"arrImgObj","arrNumList","NumBtnDom","arrow","hoverDom","setNum","indexArr")); }); o.Initial = null; o = null; object = null; //事件操做 //console.log(_arrData) var imgLength = $IMGLIST.length; function imgScroll(index,ArrData,dd){ $IMGWRAPLIST.hide() .css("z-index",-1) .eq(index) .addClass("select") .siblings() .removeClass("select"); $IMGWRAPLIST.eq(index) .find("img") .fadeTo(100,.5) .fadeTo(200,1); dd.eq(index).addClass("curr").siblings().removeClass("curr"); var indedArr = fnGetIndexArr(index,_CENTER), indedArrLen = indedArr.length,i=null; //console.log(ArrData) for(i=0;i<indedArrLen;i++){ setSize($IMGWRAPLIST.eq(indedArr[i]), ArrData[i][0], ArrData[i][1], ArrData[i][2], ArrData[i][3], ArrData[i][4], 150 ); }; }; var $prev = $("#sPrev",_SELF), $next = $("#sNext",_SELF), $dd = $("dd",_SELF); $prev.click(function(){ if(_IDX > 0) { _IDX = _IDX -1; imgScroll(_IDX,_arrData,$dd); }; return false; }); $next.click(function(){ if(_IDX < imgLength-1) { _IDX = _IDX + 1; imgScroll(_IDX,_arrData,$dd); }; return false; }); $dd.click(function(){ _IDX = $(this).index(); imgScroll(_IDX,_arrData,$dd); }); if(options.title){ var borderwidth = options.setTitle.border, warpheight = options.height, warpwidth = options.width, textHeight = options.setTitle.height; $("li.select",_SELF).live("mouseover",function(){ $(this).find("div").show().animate({"opacity":options.setTitle.opacity },100); $(this).find("b").show().delay(100).stop().animate({"height":textHeight,"opacity":options.setTitle.opacity},150); return false; }) $IMGWRAPLIST.mouseleave(function(){ $(this).find("b").show().stop().animate({"height":0,"opacity":0},150); $(this).find("div").delay(150).stop().animate({"opacity":0 },100); return false; }); }; return false; }); }; })(jQuery) </script> <script language="javascript" type="text/javascript"> <!-- $(function(){ $("#demo1").jcImgScroll({ }); $("#demo2").jcImgScroll({ count : 7 }); $("#demo3").jcImgScroll({ arrow : { //width:110, height:600, x:220, y:0 }, count : 3, offsetX : 140, NumBtn : true, title:false }); }); --> </script> </head> <body> <h1 style="font-size:20px; text-align:center; padding:10px 0;">矜持有時候說得不必定是別人的故事</h1> <div id="demo1" class="jcImgScroll"> <ul> <li><a href="http://item.taobao.com/item.htm?spm=a1z10.1.w5003-4246373693.12.CSlI7D&id=19697701274&scene=taobao_shop" target="_blank" path="http://img02.taobaocdn.com/imgextra/i2/25245440/T2.JA8XXNbXXXXXXXX-25245440.png" title="忘了有多久,時間選擇不停留~~"></a></li> <li><a href="http://item.taobao.com/item.htm?spm=a1z10.1.w5003-6197841993.9.CSlI7D&id=37695385774&scene=taobao_shop" target="_blank" path="http://img03.taobaocdn.com/imgextra/i3/25245440/T2LQsQXnlaXXXXXXXX-25245440.jpg" title="曾經咱們的笑容迴盪在青春的前場~~"></a></li> <li><a href="http://item.taobao.com/item.htm?spm=a1z10.1.w5003-6197903380.14.CSlI7D&id=22250851491&scene=taobao_shop" target="_blank" path="http://img01.taobaocdn.com/imgextra/i1/25245440/T21dDKXh4bXXXXXXXX-25245440.jpg" title="你是否願意花時間給本身,用獨特的筆觸記載獨特的心裏感想..."></a></li> <li><a href="http://item.taobao.com/item.htm?spm=a1z10.1.w5003-6197875905.6.CSlI7D&id=19692910137&scene=taobao_shop" target="_blank" path="http://img01.taobaocdn.com/imgextra/i1/25245440/T2KkVcXDBaXXXXXXXX-25245440.jpg" title="咱們都會遇到更好的本身~~"></a></li> <li><a href="http://item.taobao.com/item.htm?spm=a1z10.1.w5003-6197903380.3.CSlI7D&id=22063947206&scene=taobao_shop" target="_blank" path="http://img02.taobaocdn.com/imgextra/i2/25245440/T24Q78XaNbXXXXXXXX-25245440.jpg" title="他們說不少故事像煙花,註定只是一瞬間的璀璨......."></a></li> <li><a href="http://item.taobao.com/item.htm?spm=a1z10.1.w5003-6197841993.7.CSlI7D&id=37832874838&scene=taobao_shop" target="_blank" path="http://img01.taobaocdn.com/imgextra/i1/25245440/T2e56UXvBXXXXXXXXX-25245440.jpg" title="你是否曾在感傷的時候爲一首歌哭得聲音沙啞"></a></li> <li><a href="http://item.taobao.com/item.htm?spm=a1z10.1.w4004-3401035433.4.CSlI7D&id=19682458870" target="_blank" path="http://img01.taobaocdn.com/imgextra/i1/25245440/T2lFTUXtlXXXXXXXXX-25245440.jpg" title="本身的青春裏,總有本身的故事,june內衣部落格"></a></li> </ul> </div> <!-- 代碼 結束 --> <div style="text-align:center; line-height:25px; padding-top:10px;"> <a href="http://www.scauhci.org/">June(王映君)設計 </a> <p><script src="http://www.webskys.com/texiaoadsence.js"></script></p> </div> </body> </html>
同時,歡迎去小店光顧,也歡迎幫忙宣傳:jquery
最近想作郵箱啥的,也發現不少html特性不支持,同時,不少郵件也被郵件系統屏蔽扔垃圾箱了!web
鬱悶app
晚上要考試啊!死了,還沒複習ide