proxy(o[t],o);throw new TypeError("expected function")},e.fn.bind=function(e,n,o){return this.on(e,n,o)},e.fn.unbind=function(e,n){return this.off(e,n)},e.fn.one=function(e,n,o,t){return this.on(e,n,o,t,1)};var b=function(){return!0},y=function(){return!1},D=/^([A-Z]|returnValue$|layer[XY]$)/,A={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(e,n,o){return this.on(n,e,o)},e.fn.undelegate=function(e,n,o){return this.off(n,e,o)},e.fn.live=function(n,o){return e(document.body).delegate(this.selector,n,o),this},e.fn.die=function(n,o){return e(document.body).undelegate(this.selector,n,o),this},e.fn.on=function(n,o,t,a,i){var s,p,m=this;return n&&!f(n)?(e.each(n,(function(e,n){m.on(e,o,t,n,i)})),m):(!f(o)&&!u(a)&&!1!==a&&(a=t,t=o,o=c),(u(t)||!1===t)&&(a=t,t=c),!1===a&&(a=y),m.each((function(c,u){i&&(s=function(e){return d(u,e.type,a),a.apply(this,arguments)}),o&&(p=function(n){var t,i=e(n.target).closest(o,u).get(0);if(i&&i!==u)return t=e.extend(l(n),{currentTarget:i,liveFired:u}),(s||a).apply(i,[t].concat(w.call(arguments,1)))}),r(u,n,a,t,o,p||s)})))},e.fn.off=function(n,o,t){var a=this;return n&&!f(n)?(e.each(n,(function(e,n){a.off(e,o,n)})),a):(!f(o)&&!u(t)&&!1!==t&&(t=o,o=c),!1===t&&(t=y),a.each((function(){d(this,n,t,o)})))},e.fn.trigger=function(n,o){return(n=f(n)||e.isPlainObject(n)?e.Event(n):s(n))._args=o,this.each((function(){"dispatchEvent"in this?this.dispatchEvent(n):e(this).triggerHandler(n,o)}))},e.fn.triggerHandler=function(n,t){var a,i;return this.each((function(r,d){(a=l(f(n)?e.Event(n):n))._args=t,a.target=d,e.each(o(d,n.type||n),(function(e,n){if(i=n.proxy(a),a.isImmediatePropagationStopped())return!1}))})),i},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)}})),["focus","blur"].forEach((function(n){e.fn[n]=function(e){return e?this.bind(n,e):this.each((function(){try{this[n]()}catch(e){}})),this}})),e.Event=function(e,n){f(e)||(e=(n=e).type);var o=document.createEvent(g[e]||"Events"),t=!0;if(n)for(var a in n)"bubbles"==a?t=!!n[a]:o[a]=n[a];return o.initEvent(e,t,!0),s(o)}}(a),function(e){function n(n,o,t,a){if(n.global)return function(n,o,t){var a=e.Event(o);return e(n).trigger(a,t),!a.isDefaultPrevented()}(o||w,t,a)}function o(e,o){var t=o.context;if(!1===o.beforeSend.call(t,e,o)||!1===n(o,t,"ajaxBeforeSend",[e,o]))return!1;n(o,t,"ajaxSend",[e,o])}function t(e,o,t,a){var r=t.context,d="success";t.success.call(r,e,d,o),a&&a.resolveWith(r,[e,d,o]),n(t,r,"ajaxSuccess",[o,t,e]),i(d,o,t)}function a(e,o,t,a,r){var d=a.context;a.error.call(d,t,o,e),r&&r.rejectWith(d,[t,o,e]),n(a,d,"ajaxError",[t,a,e||o]),i(o,t,a)}function i(o,t,a){var i=a.context;a.complete.call(i,t,o),n(a,i,"ajaxComplete",[t,a]),function(o){o.global&&!--e.active&&n(o,null,"ajaxStop")}(a)}function r(){}function d(e,n){return""==n?e:(e+"&"+n).replace(/[&?]{1,2}/,"?")}function s(n,o,t,a){var i=!e.isFunction(o);return{url:n,data:i?o:void 0,success:i?e.isFunction(t)?t:void 0:o,dataType:i&&a||t}}var l,c,p=0,w=window.document,u=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,f=/^(?:text|application)\/javascript/i,m=/^(?:text|application)\/xml/i,g="application/json",h="text/html",v=/^\s*$/;e.active=0,e.ajaxJSONP=function(n,i){if("type"in n){var r,d,s=n.jsonpCallback,l=(e.isFunction(s)?s():s)||"jsonp"+ ++p,c=w.createElement("script"),u=window[l],f=function(n){e(c).triggerHandler("error",n||"abort")},m={abort:f};return i&&i.promise(m),e(c).on("load error",(function(o,s){clearTimeout(d),e(c).off().remove(),"error"!=o.type&&r?t(r[0],m,n,i):a(null,s||"error",m,n,i),window[l]=u,r&&e.isFunction(u)&&u(r[0]),u=r=void 0})),!1===o(m,n)?(f("abort"),m):(window[l]=function(){r=arguments},c.src=n.url.replace(/=\?/,"="+l),w.head.appendChild(c),n.timeout>0&&(d=setTimeout((function(){f("timeout")}),n.timeout)),m)}return e.ajax(n)},e.ajaxSettings={type:"GET",beforeSend:r,success:r,error:r,complete:r,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:g,xml:"application/xml, text/xml",html:h,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},e.ajax=function(i){var s,p=e.extend({},i||{}),w=e.Deferred&&e.Deferred();for(l in e.ajaxSettings)void 0===p[l]&&(p[l]=e.ajaxSettings[l]);(s=p).global&&0==e.active++&&n(s,null,"ajaxStart"),p.crossDomain||(p.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(p.url)&&RegExp.$2!=window.location.host),p.url||(p.url=window.location.toString()),function(n){n.processData&&n.data&&"string"!=e.type(n.data)&&(n.data=e.param(n.data,n.traditional)),n.data&&(!n.type||"GET"==n.type.toUpperCase())&&(n.url=d(n.url,n.data),n.data=void 0)}(p),!1===p.cache&&(p.url=d(p.url,"_="+Date.now()));var u=p.dataType,_=/=\?/.test(p.url);if("jsonp"==u||_)return _||(p.url=d(p.url,p.jsonp?p.jsonp+"=?":!1===p.jsonp?"":"callback=?")),e.ajaxJSONP(p,w);var b,y=p.accepts[u],D={},A=function(e,n){D[e.toLowerCase()]=[e,n]},E=/^([\w-]+:)\/\//.test(p.url)?RegExp.$1:window.location.protocol,k=p.xhr(),N=k.setRequestHeader;if(w&&w.promise(k),p.crossDomain||A("X-Requested-With","XMLHttpRequest"),A("Accept",y||"*/*"),(y=p.mimeType||y)&&(y.indexOf(",")>-1&&(y=y.split(",",2)[0]),k.overrideMimeType&&k.overrideMimeType(y)),(p.contentType||!1!==p.contentType&&p.data&&"GET"!=p.type.toUpperCase())&&A("Content-Type",p.contentType||"application/x-www-form-urlencoded"),p.headers)for(c in p.headers)A(c,p.headers[c]);if(k.setRequestHeader=A,k.onreadystatechange=function(){if(4==k.readyState){k.onreadystatechange=r,clearTimeout(b);var n,o=!1;if(k.status>=200&&k.status<300||304==k.status||0==k.status&&"file:"==E){u=u||function(e){return e&&(e=e.split(";",2)[0]),e&&(e==h?"html":e==g?"json":f.test(e)?"script":m.test(e)&&"xml")||"text"}(p.mimeType||k.getResponseHeader("content-type")),n=k.responseText;try{"script"==u?(0,eval)(n):"xml"==u?n=k.responseXML:"json"==u&&(n=v.
Back to home |
File page
Subscribe |
Register |
Login
| N