==o?_(o):y},val:function(e){return 0===arguments.length?this[0]&&(this[0].multiple?A(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value):this.each((function(n){this.value=g(this,e,n,this.value)}))},offset:function(e){if(e)return this.each((function(n){var o=A(this),t=g(this,e,n,o.offset()),a=o.offsetParent().offset(),i={top:t.top-a.top,left:t.left-a.left};"static"==o.css("position")&&(i.position="relative"),o.css(i)}));if(0==this.length)return null;var n=this[0].getBoundingClientRect();return{left:n.left+window.pageXOffset,top:n.top+window.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(n,o){if(arguments.length<2){var t=this[0],a=getComputedStyle(t,"");if(!t)return;if("string"==typeof n)return t.style[k(n)]||a.getPropertyValue(n);if(d(n)){var i={};return A.each(d(n)?n:[n],(function(e,n){i[n]=t.style[k(n)]||a.getPropertyValue(n)})),i}}var r="";if("string"==e(n))o||0===o?r=c(n)+":"+w(n,o):this.each((function(){this.style.removeProperty(c(n))}));else for(D in n)n[D]||0===n[D]?r+=c(D)+":"+w(D,n[D])+";":this.each((function(){this.style.removeProperty(c(D))}));return this.each((function(){this.style.cssText+=";"+r}))},index:function(e){return e?this.indexOf(A(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&T.some.call(this,(function(e){return this.test(v(e))}),p(e))},addClass:function(e){return e?this.each((function(n){E=[];var o=v(this);g(this,e,n,o).split(/\s+/g).forEach((function(e){A(this).hasClass(e)||E.push(e)}),this),E.length&&v(this,o+(o?" ":"")+E.join(" "))})):this},removeClass:function(e){return this.each((function(n){if(e===y)return v(this,"");E=v(this),g(this,e,n,E).split(/\s+/g).forEach((function(e){E=E.replace(p(e)," ")})),v(this,E.trim())}))},toggleClass:function(e,n){return e?this.each((function(o){var t=A(this);g(this,e,o,v(this)).split(/\s+/g).forEach((function(e){(n===y?!t.hasClass(e):n)?t.addClass(e):t.removeClass(e)}))})):this},scrollTop:function(e){if(this.length){var n="scrollTop"in this[0];return e===y?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var n="scrollLeft"in this[0];return e===y?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var e=this[0],n=this.offsetParent(),o=this.offset(),t=L.test(n[0].nodeName)?{top:0,left:0}:n.offset();return o.top-=parseFloat(A(e).css("margin-top"))||0,o.left-=parseFloat(A(e).css("margin-left"))||0,t.top+=parseFloat(A(n[0]).css("border-top-width"))||0,t.left+=parseFloat(A(n[0]).css("border-left-width"))||0,{top:o.top-t.top,left:o.left-t.left}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||x.body;e&&!L.test(e.nodeName)&&"static"==A(e).css("position");)e=e.offsetParent;return e}))}},A.fn.detach=A.fn.remove,["width","height"].forEach((function(e){var n=e.replace(/./,(function(e){return e[0].toUpperCase()}));A.fn[e]=function(o){var i,r=this[0];return o===y?t(r)?r["inner"+n]:a(r)?r.documentElement["scroll"+n]:(i=this.offset())&&i[e]:this.each((function(n){(r=A(this)).css(e,g(this,o,n,r[e]()))}))}})),["after","prepend","before","append"].forEach((function(n,o){var t=o%2;A.fn[n]=function(){var n,a,i=A.map(arguments,(function(o){return"object"==(n=e(o))||"array"==n||null==o?o:Y.fragment(o)})),r=this.length>1;return i.length<1?this:this.each((function(e,n){a=t?n:n.parentNode,n=0==o?n.nextSibling:1==o?n.firstChild:2==o?n:null,i.forEach((function(e){if(r)e=e.cloneNode(!0);else if(!a)return A(e).remove();b(a.insertBefore(e,n),(function(e){null!=e.nodeName&&"SCRIPT"===e.nodeName.toUpperCase()&&(!e.type||"text/javascript"===e.type)&&!e.src&&window.eval.call(window,e.innerHTML)}))}))}))},A.fn[t?n+"To":"insert"+(o?"Before":"After")]=function(e){return A(e)[n](this),this}})),Y.Z.prototype=A.fn,Y.uniq=N,Y.deserializeValue=_,A.zepto=Y,A}();window.Zepto=a,void 0===window.$&&(window.$=a),function(e){function n(e){return e._zid||(e._zid=p++)}function o(e,o,a,i){if((o=t(o)).ns)var r=function(e){return new RegExp("(?:^| )"+e.replace(" "," .* ?")+"(?: |$)")}(o.ns);return(m[n(e)]||[]).filter((function(e){return e&&(!o.e||e.e==o.e)&&(!o.ns||r.test(e.ns))&&(!a||n(e.fn)===n(a))&&(!i||e.sel==i)}))}function t(e){var n=(""+e).split(".");return{e:n[0],ns:n.slice(1).sort().join(" ")}}function a(e,n){return e.del&&!h&&e.e in v||!!n}function i(e){return _[e]||h&&v[e]||e}function r(o,r,d,l,p,w,u){var f=n(o),g=m[f]||(m[f]=[]);r.split(/\s/).forEach((function(n){if("ready"==n)return e(document).ready(d);var r=t(n);r.fn=d,r.sel=p,r.e in _&&(d=function(n){var o=n.relatedTarget;if(!o||o!==this&&!e.contains(this,o))return r.fn.apply(this,arguments)}),r.del=w;var f=w||d;r.proxy=function(e){if(!(e=s(e)).isImmediatePropagationStopped()){e.data=l;var n=f.apply(o,e._args==c?[e]:[e].concat(e._args));return!1===n&&(e.preventDefault(),e.stopPropagation()),n}},r.i=g.length,g.push(r),"addEventListener"in o&&o.addEventListener(i(r.e),r.proxy,a(r,u))}))}function d(e,t,r,d,s){var l=n(e);(t||"").split(/\s/).forEach((function(n){o(e,n,r,d).forEach((function(n){delete m[l][n.i],"removeEventListener"in e&&e.removeEventListener(i(n.e),n.proxy,a(n,s))}))}))}function s(n,o){return!o&&n.isDefaultPrevented||(o||(o=n),e.each(A,(function(e,t){var a=o[e];n[e]=function(){return this[t]=b,a&&a.apply(o,arguments)},n[t]=y})),(o.defaultPrevented!==c?o.defaultPrevented:"returnValue"in o?!1===o.returnValue:o.getPreventDefault&&o.getPreventDefault())&&(n.isDefaultPrevented=b)),n}function l(e){var n,o={originalEvent:e};for(n in e)!D.test(n)&&e[n]!==c&&(o[n]=e[n]);return s(o,e)}e.zepto.qsa;var c,p=1,w=Array.prototype.slice,u=e.isFunction,f=function(e){return"string"==typeof e},m={},g={},h="onfocusin"in window,v={focus:"focusin",blur:"focusout"},_={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",e.event={add:r,remove:d},e.proxy=function(o,t){if(u(o)){var a=function(){return o.apply(t,arguments)};return a._zid=n(o),a}if(f(t))return e.

Prev | Next
Pg.: 1 ... 17 18 19 20 21 22 23 24 25 26 27 ... 41


Back to home | File page

Subscribe | Register | Login | N