/BlogEngine/BlogEngine.NET/Scripts/jQuery/jquery-1.5-vsdoc.js
JavaScript | 6574 lines | 3408 code | 897 blank | 2269 comment | 1132 complexity | 5d3a3682e1ba1b76d495104ddf89f0ac MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
Large files files are truncated, but you can click here to view the full file
- /*
- * This file has been generated to support Visual Studio IntelliSense.
- * You should not use this file at runtime inside the browser--it is only
- * intended to be used only for design-time IntelliSense. Please use the
- * standard jQuery library for all production use.
- *
- * Comment version: 1.5
- */
-
- /*!
- * jQuery JavaScript Library v1.5
- * http://jquery.com/
- *
- * Distributed in whole under the terms of the MIT
- *
- * Copyright 2010, John Resig
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2010, The Dojo Foundation
- * Released under the MIT and BSD Licenses.
- */
-
- (function (window, undefined) {
- var jQuery = function (selector, context) {
- /// <summary>
- /// 1: Accepts a string containing a CSS selector which is then used to match a set of elements.
- /// 1.1 - $(selector, context)
- /// 1.2 - $(element)
- /// 1.3 - $(elementArray)
- /// 1.4 - $(jQuery object)
- /// 1.5 - $()
- /// 2: Creates DOM elements on the fly from the provided string of raw HTML.
- /// 2.1 - $(html, ownerDocument)
- /// 2.2 - $(html, props)
- /// 3: Binds a function to be executed when the DOM has finished loading.
- /// 3.1 - $(callback)
- /// </summary>
- /// <param name="selector" type="String">
- /// A string containing a selector expression
- /// </param>
- /// <param name="context" type="jQuery">
- /// A DOM Element, Document, or jQuery to use as context
- /// </param>
- /// <returns type="jQuery" />
-
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init(selector, context, rootjQuery);
- };
- jQuery.Deferred = function (func) {
-
- var deferred = jQuery._Deferred(),
- failDeferred = jQuery._Deferred(),
- promise;
- // Add errorDeferred methods, then and promise
- jQuery.extend(deferred, {
- then: function (doneCallbacks, failCallbacks) {
- deferred.done(doneCallbacks).fail(failCallbacks);
- return this;
- },
- fail: failDeferred.done,
- rejectWith: failDeferred.resolveWith,
- reject: failDeferred.resolve,
- isRejected: failDeferred.isResolved,
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function (obj, i /* internal */) {
- if (obj == null) {
- if (promise) {
- return promise;
- }
- promise = obj = {};
- }
- i = promiseMethods.length;
- while (i--) {
- obj[promiseMethods[i]] = deferred[promiseMethods[i]];
- }
- return obj;
- }
- });
- // Make sure only one callback list will be used
- deferred.then(failDeferred.cancel, deferred.cancel);
- // Unexpose cancel
- delete deferred.cancel;
- // Call given func if any
- if (func) {
- func.call(deferred, deferred);
- }
- return deferred;
- };
- jQuery.Event = function (src) {
-
- // Allow instantiation without the 'new' keyword
- if (!this.preventDefault) {
- return new jQuery.Event(src);
- }
-
- // Event object
- if (src && src.type) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
- src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // timeStamp is buggy for some events on Firefox(#3843)
- // So we won't rely on the native value
- this.timeStamp = jQuery.now();
-
- // Mark it as fixed
- this[jQuery.expando] = true;
- };
- jQuery._Deferred = function () {
-
- var // callbacks list
- callbacks = [],
- // stored [ context , args ]
- fired,
- // to avoid firing when already doing so
- firing,
- // flag to know if the deferred has been cancelled
- cancelled,
- // the deferred itself
- deferred = {
-
- // done( f1, f2, ...)
- done: function () {
- if (!cancelled) {
- var args = arguments,
- i,
- length,
- elem,
- type,
- _fired;
- if (fired) {
- _fired = fired;
- fired = 0;
- }
- for (i = 0, length = args.length; i < length; i++) {
- elem = args[i];
- type = jQuery.type(elem);
- if (type === "array") {
- deferred.done.apply(deferred, elem);
- } else if (type === "function") {
- callbacks.push(elem);
- }
- }
- if (_fired) {
- deferred.resolveWith(_fired[0], _fired[1]);
- }
- }
- return this;
- },
-
- // resolve with given context and args
- resolveWith: function (context, args) {
- if (!cancelled && !fired && !firing) {
- firing = 1;
- try {
- while (callbacks[0]) {
- callbacks.shift().apply(context, args);
- }
- }
- finally {
- fired = [context, args];
- firing = 0;
- }
- }
- return this;
- },
-
- // resolve with this as context and given arguments
- resolve: function () {
- deferred.resolveWith(jQuery.isFunction(this.promise) ? this.promise() : this, arguments);
- return this;
- },
-
- // Has this deferred been resolved?
- isResolved: function () {
- return !!(firing || fired);
- },
-
- // Cancel
- cancel: function () {
- cancelled = 1;
- callbacks = [];
- return this;
- }
- };
-
- return deferred;
- };
- jQuery._data = function (elem, name, data) {
-
- return jQuery.data(elem, name, data, true);
- };
- jQuery.acceptData = function (elem) {
-
- if (elem.nodeName) {
- var match = jQuery.noData[elem.nodeName.toLowerCase()];
-
- if (match) {
- return !(match === true || elem.getAttribute("classid") !== match);
- }
- }
-
- return true;
- };
- jQuery.access = function (elems, key, value, exec, fn, pass) {
-
- var length = elems.length;
-
- // Setting many attributes
- if (typeof key === "object") {
- for (var k in key) {
- jQuery.access(elems, k, key[k], exec, fn, value);
- }
- return elems;
- }
-
- // Setting one attribute
- if (value !== undefined) {
- // Optionally, function values get executed if exec is true
- exec = !pass && exec && jQuery.isFunction(value);
-
- for (var i = 0; i < length; i++) {
- fn(elems[i], key, exec ? value.call(elems[i], i, fn(elems[i], key)) : value, pass);
- }
-
- return elems;
- }
-
- // Getting an attribute
- return length ? fn(elems[0], key) : undefined;
- };
- jQuery.active = 0;
- jQuery.ajax = function (url, options) {
- /// <summary>
- /// Perform an asynchronous HTTP (Ajax) request.
- /// 1 - jQuery.ajax(url, settings)
- /// 2 - jQuery.ajax(settings)
- /// </summary>
- /// <param name="url" type="String">
- /// A string containing the URL to which the request is sent.
- /// </param>
- /// <param name="options" type="Object">
- /// A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) below for a complete list of all settings.
- /// </param>
-
-
- // If options is not an object,
- // we simulate pre-1.5 signature
- if (typeof options !== "object") {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var // Create the final options object
- s = jQuery.extend(true, {}, jQuery.ajaxSettings, options),
- // Callbacks contexts
- // We force the original context if it exists
- // or take it from jQuery.ajaxSettings otherwise
- // (plain objects used as context get extended)
- callbackContext =
- (s.context = ("context" in options ? options : jQuery.ajaxSettings).context) || s,
- globalEventContext = callbackContext === s ? jQuery.event : jQuery(callbackContext),
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery._Deferred(),
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
- // Headers (they are sent all at once)
- requestHeaders = {},
- // Response headers
- responseHeadersString,
- responseHeaders,
- // transport
- transport,
- // timeout handle
- timeoutTimer,
- // Cross-domain detection vars
- loc = document.location,
- protocol = loc.protocol || "http:",
- parts,
- // The jXHR state
- state = 0,
- // Loop variable
- i,
- // Fake xhr
- jXHR = {
-
- readyState: 0,
-
- // Caches the header
- setRequestHeader: function (name, value) {
- if (state === 0) {
- requestHeaders[name.toLowerCase()] = value;
- }
- return this;
- },
-
- // Raw string
- getAllResponseHeaders: function () {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Builds headers hashtable if needed
- getResponseHeader: function (key) {
- var match;
- if (state === 2) {
- if (!responseHeaders) {
- responseHeaders = {};
- while ((match = rheaders.exec(responseHeadersString))) {
- responseHeaders[match[1].toLowerCase()] = match[2];
- }
- }
- match = responseHeaders[key.toLowerCase()];
- }
- return match || null;
- },
-
- // Cancel the request
- abort: function (statusText) {
- statusText = statusText || "abort";
- if (transport) {
- transport.abort(statusText);
- }
- done(0, statusText);
- return this;
- }
- };
-
- // Callback for when everything is done
- // It is defined here because jslint complains if it is declared
- // at the end of the function (which would be more logical and readable)
- function done(status, statusText, responses, headers) {
-
- // Called once
- if (state === 2) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if (timeoutTimer) {
- clearTimeout(timeoutTimer);
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jXHR.readyState = status ? 4 : 0;
-
- var isSuccess,
- success,
- error,
- response = responses ? ajaxHandleResponses(s, jXHR, responses) : undefined,
- lastModified,
- etag;
-
- // If successful, handle type chaining
- if (status >= 200 && status < 300 || status === 304) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if (s.ifModified) {
-
- if ((lastModified = jXHR.getResponseHeader("Last-Modified"))) {
- jQuery.lastModified[s.url] = lastModified;
- }
- if ((etag = jXHR.getResponseHeader("Etag"))) {
- jQuery.etag[s.url] = etag;
- }
- }
-
- // If not modified
- if (status === 304) {
-
- statusText = "notmodified";
- isSuccess = true;
-
- // If we have data
- } else {
-
- try {
- success = ajaxConvert(s, response);
- statusText = "success";
- isSuccess = true;
- } catch (e) {
- // We have a parsererror
- statusText = "parsererror";
- error = e;
- }
- }
- } else {
- // We extract error from statusText
- // then normalize statusText and status for non-aborts
- error = statusText;
- if (status) {
- statusText = "error";
- if (status < 0) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jXHR.status = status;
- jXHR.statusText = statusText;
-
- // Success/Error
- if (isSuccess) {
- deferred.resolveWith(callbackContext, [success, statusText, jXHR]);
- } else {
- deferred.rejectWith(callbackContext, [jXHR, statusText, error]);
- }
-
- // Status-dependent callbacks
- jXHR.statusCode(statusCode);
- statusCode = undefined;
-
- if (s.global) {
- globalEventContext.trigger("ajax" + (isSuccess ? "Success" : "Error"),
- [jXHR, s, isSuccess ? success : error]);
- }
-
- // Complete
- completeDeferred.resolveWith(callbackContext, [jXHR, statusText]);
-
- if (s.global) {
- globalEventContext.trigger("ajaxComplete", [jXHR, s]);
- // Handle the global AJAX counter
- if (!(--jQuery.active)) {
- jQuery.event.trigger("ajaxStop");
- }
- }
- }
-
- // Attach deferreds
- deferred.promise(jXHR);
- jXHR.success = jXHR.done;
- jXHR.error = jXHR.fail;
- jXHR.complete = completeDeferred.done;
-
- // Status-dependent callbacks
- jXHR.statusCode = function (map) {
- if (map) {
- var tmp;
- if (state < 2) {
- for (tmp in map) {
- statusCode[tmp] = [statusCode[tmp], map[tmp]];
- }
- } else {
- tmp = map[jXHR.status];
- jXHR.then(tmp, tmp);
- }
- }
- return this;
- };
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
- // We also use the url parameter if available
- s.url = ("" + (url || s.url)).replace(rhash, "").replace(rprotocol, protocol + "//");
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().split(rspacesAjax);
-
- // Determine if a cross-domain request is in order
- if (!s.crossDomain) {
- parts = rurl.exec(s.url.toLowerCase());
- s.crossDomain = !!(parts &&
- (parts[1] != protocol || parts[2] != loc.hostname ||
- (parts[3] || (parts[1] === "http:" ? 80 : 443)) !=
- (loc.port || (protocol === "http:" ? 80 : 443)))
- );
- }
-
- // Convert data if not already a string
- if (s.data && s.processData && typeof s.data !== "string") {
- s.data = jQuery.param(s.data, s.traditional);
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports(prefilters, s, options, jXHR);
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test(s.type);
-
- // Watch for a new set of requests
- if (s.global && jQuery.active++ === 0) {
- jQuery.event.trigger("ajaxStart");
- }
-
- // More options handling for requests with no content
- if (!s.hasContent) {
-
- // If data is available, append data to url
- if (s.data) {
- s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
- }
-
- // Add anti-cache in url if needed
- if (s.cache === false) {
-
- var ts = jQuery.now(),
- // try replacing _= if it is there
- ret = s.url.replace(rts, "$1_=" + ts);
-
- // if nothing was replaced, add timestamp to the end
- s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
- }
- }
-
- // Set the correct header, if data is being sent
- if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
- requestHeaders["content-type"] = s.contentType;
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if (s.ifModified) {
- if (jQuery.lastModified[s.url]) {
- requestHeaders["if-modified-since"] = jQuery.lastModified[s.url];
- }
- if (jQuery.etag[s.url]) {
- requestHeaders["if-none-match"] = jQuery.etag[s.url];
- }
- }
-
- // Set the Accepts header for the server, depending on the dataType
- requestHeaders.accept = s.dataTypes[0] && s.accepts[s.dataTypes[0]] ?
- s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", */*; q=0.01" : "") :
- s.accepts["*"];
-
- // Check for headers option
- for (i in s.headers) {
- requestHeaders[i.toLowerCase()] = s.headers[i];
- }
-
- // Allow custom headers/mimetypes and early abort
- if (s.beforeSend && (s.beforeSend.call(callbackContext, jXHR, s) === false || state === 2)) {
- // Abort if not done already
- done(0, "abort");
- // Return false
- jXHR = false;
-
- } else {
-
- // Install callbacks on deferreds
- for (i in { success: 1, error: 1, complete: 1 }) {
- jXHR[i](s[i]);
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports(transports, s, options, jXHR);
-
- // If no transport, we auto-abort
- if (!transport) {
- done(-1, "No Transport");
- } else {
- // Set state as sending
- state = jXHR.readyState = 1;
- // Send global event
- if (s.global) {
- globalEventContext.trigger("ajaxSend", [jXHR, s]);
- }
- // Timeout
- if (s.async && s.timeout > 0) {
- timeoutTimer = setTimeout(function () {
- jXHR.abort("timeout");
- }, s.timeout);
- }
-
- try {
- transport.send(requestHeaders, done);
- } catch (e) {
- // Propagate exception as error if not done
- if (status < 2) {
- done(-1, e);
- // Simply rethrow otherwise
- } else {
- jQuery.error(e);
- }
- }
- }
- }
- return jXHR;
- };
- jQuery.ajaxPrefilter = function (dataTypeExpression, func) {
-
-
- if (typeof dataTypeExpression !== "string") {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- if (jQuery.isFunction(func)) {
- var dataTypes = dataTypeExpression.toLowerCase().split(rspacesAjax),
- i = 0,
- length = dataTypes.length,
- dataType,
- list,
- placeBefore;
-
- // For each dataType in the dataTypeExpression
- for (; i < length; i++) {
- dataType = dataTypes[i];
- // We control if we're asked to add before
- // any existing element
- placeBefore = /^\+/.test(dataType);
- if (placeBefore) {
- dataType = dataType.substr(1) || "*";
- }
- list = structure[dataType] = structure[dataType] || [];
- // then we add to the structure accordingly
- list[placeBefore ? "unshift" : "push"](func);
- }
- }
- };
- jQuery.ajaxSettings = { "url": 'http://localhost:25812/',
- "global": true,
- "type": 'GET',
- "contentType": 'application/x-www-form-urlencoded',
- "processData": true,
- "async": true,
- "accepts": {},
- "contents": {},
- "responseFields": {},
- "converters": {},
- "jsonp": 'callback'
- };
- jQuery.ajaxSetup = function (settings) {
- /// <summary>
- /// Set default values for future Ajax requests.
- /// </summary>
- /// <param name="settings" type="Object">
- /// A set of key/value pairs that configure the default Ajax request. All options are optional.
- /// </param>
-
- jQuery.extend(true, jQuery.ajaxSettings, settings);
- if (settings.context) {
- jQuery.ajaxSettings.context = settings.context;
- }
- };
- jQuery.ajaxTransport = function (dataTypeExpression, func) {
-
-
- if (typeof dataTypeExpression !== "string") {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- if (jQuery.isFunction(func)) {
- var dataTypes = dataTypeExpression.toLowerCase().split(rspacesAjax),
- i = 0,
- length = dataTypes.length,
- dataType,
- list,
- placeBefore;
-
- // For each dataType in the dataTypeExpression
- for (; i < length; i++) {
- dataType = dataTypes[i];
- // We control if we're asked to add before
- // any existing element
- placeBefore = /^\+/.test(dataType);
- if (placeBefore) {
- dataType = dataType.substr(1) || "*";
- }
- list = structure[dataType] = structure[dataType] || [];
- // then we add to the structure accordingly
- list[placeBefore ? "unshift" : "push"](func);
- }
- }
- };
- jQuery.attr = function (elem, name, value, pass) {
-
- // don't get/set attributes on text, comment and attribute nodes
- if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || elem.nodeType === 2) {
- return undefined;
- }
-
- if (pass && name in jQuery.attrFn) {
- return jQuery(elem)[name](value);
- }
-
- var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc(elem),
- // Whether we are setting (or getting)
- set = value !== undefined;
-
- // Try to normalize/fix the name
- name = notxml && jQuery.props[name] || name;
-
- // Only do all the following if this is a node (faster for style)
- if (elem.nodeType === 1) {
- // These attributes require special treatment
- var special = rspecialurl.test(name);
-
- // Safari mis-reports the default selected property of an option
- // Accessing the parent's selectedIndex property fixes it
- if (name === "selected" && !jQuery.support.optSelected) {
- var parent = elem.parentNode;
- if (parent) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if (parent.parentNode) {
- parent.parentNode.selectedIndex;
- }
- }
- }
-
- // If applicable, access the attribute via the DOM 0 way
- // 'in' checks fail in Blackberry 4.7 #6931
- if ((name in elem || elem[name] !== undefined) && notxml && !special) {
- if (set) {
- // We can't allow the type property to be changed (since it causes problems in IE)
- if (name === "type" && rtype.test(elem.nodeName) && elem.parentNode) {
- jQuery.error("type property can't be changed");
- }
-
- if (value === null) {
- if (elem.nodeType === 1) {
- elem.removeAttribute(name);
- }
-
- } else {
- elem[name] = value;
- }
- }
-
- // browsers index elements by id/name on forms, give priority to attributes.
- if (jQuery.nodeName(elem, "form") && elem.getAttributeNode(name)) {
- return elem.getAttributeNode(name).nodeValue;
- }
-
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- if (name === "tabIndex") {
- var attributeNode = elem.getAttributeNode("tabIndex");
-
- return attributeNode && attributeNode.specified ?
- attributeNode.value :
- rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href ?
- 0 :
- undefined;
- }
-
- return elem[name];
- }
-
- if (!jQuery.support.style && notxml && name === "style") {
- if (set) {
- elem.style.cssText = "" + value;
- }
-
- return elem.style.cssText;
- }
-
- if (set) {
- // convert the value to a string (all browsers do this but IE) see #1070
- elem.setAttribute(name, "" + value);
- }
-
- // Ensure that missing attributes return undefined
- // Blackberry 4.7 returns "" from getAttribute #6938
- if (!elem.attributes[name] && (elem.hasAttribute && !elem.hasAttribute(name))) {
- return undefined;
- }
-
- var attr = !jQuery.support.hrefNormalized && notxml && special ?
- // Some attributes require a special call on IE
- elem.getAttribute(name, 2) :
- elem.getAttribute(name);
-
- // Non-existent attributes return null, we normalize to undefined
- return attr === null ? undefined : attr;
- }
- // Handle everything which isn't a DOM element node
- if (set) {
- elem[name] = value;
- }
- return elem[name];
- };
- jQuery.attrFn = { "val": true,
- "css": true,
- "html": true,
- "text": true,
- "data": true,
- "width": true,
- "height": true,
- "offset": true,
- "blur": true,
- "focus": true,
- "focusin": true,
- "focusout": true,
- "load": true,
- "resize": true,
- "scroll": true,
- "unload": true,
- "click": true,
- "dblclick": true,
- "mousedown": true,
- "mouseup": true,
- "mousemove": true,
- "mouseover": true,
- "mouseout": true,
- "mouseenter": true,
- "mouseleave": true,
- "change": true,
- "select": true,
- "submit": true,
- "keydown": true,
- "keypress": true,
- "keyup": true,
- "error": true
- };
- jQuery.bindReady = function () {
-
- if (readyBound) {
- return;
- }
-
- readyBound = true;
-
- // Catch cases where $(document).ready() is called after the
- // browser event has already occurred.
- if (document.readyState === "complete") {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- return setTimeout(jQuery.ready, 1);
- }
-
- // Mozilla, Opera and webkit nightlies currently support this event
- if (document.addEventListener) {
- // Use the handy event callback
- document.addEventListener("DOMContentLoaded", DOMContentLoaded, false);
-
- // A fallback to window.onload, that will always work
- window.addEventListener("load", jQuery.ready, false);
-
- // If IE event model is used
- } else if (document.attachEvent) {
- // ensure firing before onload,
- // maybe late but safe also for iframes
- document.attachEvent("onreadystatechange", DOMContentLoaded);
-
- // A fallback to window.onload, that will always work
- window.attachEvent("onload", jQuery.ready);
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var toplevel = false;
-
- try {
- toplevel = window.frameElement == null;
- } catch (e) { }
-
- if (document.documentElement.doScroll && toplevel) {
- doScrollCheck();
- }
- }
- };
- jQuery.boxModel = true;
- jQuery.browser = { "webkit": true,
- "version": '534.13',
- "safari": true
- };
- jQuery.buildFragment = function (args, nodes, scripts) {
-
- var fragment, cacheable, cacheresults,
- doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
-
- // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
- // Cloning options loses the selected state, so don't cache them
- // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
- // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
- if (args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
- args[0].charAt(0) === "<" && !rnocache.test(args[0]) && (jQuery.support.checkClone || !rchecked.test(args[0]))) {
-
- cacheable = true;
- cacheresults = jQuery.fragments[args[0]];
- if (cacheresults) {
- if (cacheresults !== 1) {
- fragment = cacheresults;
- }
- }
- }
-
- if (!fragment) {
- fragment = doc.createDocumentFragment();
- jQuery.clean(args, doc, fragment, scripts);
- }
-
- if (cacheable) {
- jQuery.fragments[args[0]] = cacheresults ? fragment : 1;
- }
-
- return { fragment: fragment, cacheable: cacheable };
- };
- jQuery.cache = {};
- jQuery.camelCase = function (string) {
-
- return string.replace(rdashAlpha, fcamelCase);
- };
- jQuery.clean = function (elems, context, fragment, scripts) {
-
- context = context || document;
-
- // !context.createElement fails in IE with an error but returns typeof 'object'
- if (typeof context.createElement === "undefined") {
- context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
- }
-
- var ret = [];
-
- for (var i = 0, elem; (elem = elems[i]) != null; i++) {
- if (typeof elem === "number") {
- elem += "";
- }
-
- if (!elem) {
- continue;
- }
-
- // Convert html string into DOM nodes
- if (typeof elem === "string" && !rhtml.test(elem)) {
- elem = context.createTextNode(elem);
-
- } else if (typeof elem === "string") {
- // Fix "XHTML"-style tags in all browsers
- elem = elem.replace(rxhtmlTag, "<$1></$2>");
-
- // Trim whitespace, otherwise indexOf won't work as expected
- var tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(),
- wrap = wrapMap[tag] || wrapMap._default,
- depth = wrap[0],
- div = context.createElement("div");
-
- // Go to html and back, then peel off extra wrappers
- div.innerHTML = wrap[1] + elem + wrap[2];
-
- // Move to the right depth
- while (depth--) {
- div = div.lastChild;
- }
-
- // Remove IE's autoinserted <tbody> from table fragments
- if (!jQuery.support.tbody) {
-
- // String was a <table>, *may* have spurious <tbody>
- var hasBody = rtbody.test(elem),
- tbody = tag === "table" && !hasBody ?
- div.firstChild && div.firstChild.childNodes :
-
- // String was a bare <thead> or <tfoot>
- wrap[1] === "<table>" && !hasBody ?
- div.childNodes :
- [];
-
- for (var j = tbody.length - 1; j >= 0; --j) {
- if (jQuery.nodeName(tbody[j], "tbody") && !tbody[j].childNodes.length) {
- tbody[j].parentNode.removeChild(tbody[j]);
- }
- }
-
- }
-
- // IE completely kills leading whitespace when innerHTML is used
- if (!jQuery.support.leadingWhitespace && rleadingWhitespace.test(elem)) {
- div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]), div.firstChild);
- }
-
- elem = div.childNodes;
- }
-
- if (elem.nodeType) {
- ret.push(elem);
- } else {
- ret = jQuery.merge(ret, elem);
- }
- }
-
- if (fragment) {
- for (i = 0; ret[i]; i++) {
- if (scripts && jQuery.nodeName(ret[i], "script") && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript")) {
- scripts.push(ret[i].parentNode ? ret[i].parentNode.removeChild(ret[i]) : ret[i]);
-
- } else {
- if (ret[i].nodeType === 1) {
- ret.splice.apply(ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));
- }
- fragment.appendChild(ret[i]);
- }
- }
- }
-
- return ret;
- };
- jQuery.cleanData = function (elems) {
-
- var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,
- deleteExpando = jQuery.support.deleteExpando;
-
- for (var i = 0, elem; (elem = elems[i]) != null; i++) {
- if (elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) {
- continue;
- }
-
- id = elem[jQuery.expando];
-
- if (id) {
- data = cache[id] && cache[id][internalKey];
-
- if (data && data.events) {
- for (var type in data.events) {
- if (special[type]) {
- jQuery.event.remove(elem, type);
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent(elem, type, data.handle);
- }
- }
-
- // Null the DOM reference to avoid IE6/7/8 leak (#7054)
- if (data.handle) {
- data.handle.elem = null;
- }
- }
-
- if (deleteExpando) {
- delete elem[jQuery.expando];
-
- } else if (elem.removeAttribute) {
- elem.removeAttribute(jQuery.expando);
- }
-
- delete cache[id];
- }
- }
- };
- jQuery.clone = function (elem, dataAndEvents, deepDataAndEvents) {
-
- var clone = elem.cloneNode(true),
- srcElements,
- destElements,
- i;
-
- if (!jQuery.support.noCloneEvent && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {
- // IE copies events bound via attachEvent when using cloneNode.
- // Calling detachEvent on the clone will also remove the events
- // from the original. In order to get around this, we use some
- // proprietary methods to clear the events. Thanks to MooTools
- // guys for this hotness.
-
- // Using Sizzle here is crazy slow, so we use getElementsByTagName
- // instead
- srcElements = elem.getElementsByTagName("*");
- destElements = clone.getElementsByTagName("*");
-
- // Weird iteration because IE will replace the length property
- // with an element if you are cloning the body and one of the
- // elements on the page has a name or id of "length"
- for (i = 0; srcElements[i]; ++i) {
- cloneFixAttributes(srcElements[i], destElements[i]);
- }
-
- cloneFixAttributes(elem, clone);
- }
-
- // Copy the events from the original to the clone
- if (dataAndEvents) {
-
- cloneCopyEvent(elem, clone);
-
- if (deepDataAndEvents && "getElementsByTagName" in elem) {
-
- srcElements = elem.getElementsByTagName("*");
- destElements = clone.getElementsByTagName("*");
-
- if (srcElements.length) {
- for (i = 0; srcElements[i]; ++i) {
- cloneCopyEvent(srcElements[i], destElements[i]);
- }
- }
- }
- }
- // Return the cloned set
- return clone;
- };
- jQuery.contains = function (a, b) {
- /// <summary>
- /// Check to see if a DOM node is within another DOM node.
- /// </summary>
- /// <param name="a" domElement="true">
- /// The DOM element that may contain the other element.
- /// </param>
- /// <param name="b" domElement="true">
- /// The DOM node that may be contained by the other element.
- /// </param>
- /// <returns type="Boolean" />
-
- return a !== b && (a.contains ? a.contains(b) : true);
- };
- jQuery.css = function (elem, name, extra) {
-
- // Make sure that we're working with the right name
- var ret, origName = jQuery.camelCase(name),
- hooks = jQuery.cssHooks[origName];
-
- name = jQuery.cssProps[origName] || origName;
-
- // If a hook was provided get the computed value from there
- if (hooks && "get" in hooks && (ret = hooks.get(elem, true, extra)) !== undefined) {
- return ret;
-
- // Otherwise, if a way to get the computed value exists, use that
- } else if (curCSS) {
- return curCSS(elem, name, origName);
- }
- };
- jQuery.cssHooks = { "opacity": {},
- "height": {},
- "width": {}
- };
- jQuery.cssNumber = { "zIndex": true,
- "fontWeight": true,
- "opacity": true,
- "zoom": true,
- "lineHeight": true
- };
- jQuery.cssProps = { "float": 'cssFloat' };
- jQuery.curCSS = function (elem, name, extra) {
-
- // Make sure that we're working with the right name
- var ret, origName = jQuery.camelCase(name),
- hooks = jQuery.cssHooks[origName];
-
- name = jQuery.cssProps[origName] || origName;
-
- // If a hook was provided get the computed value from there
- if (hooks && "get" in hooks && (ret = hooks.get(elem, true, extra)) !== undefined) {
- return ret;
-
- // Otherwise, if a way to get the computed value exists, use that
- } else if (curCSS) {
- return curCSS(elem, name, origName);
- }
- };
- jQuery.data = function (elem, name, data, pvt /* Internal Use Only */) {
- /// <summary>
- /// 1: Store arbitrary data associated with the specified element.
- /// 1.1 - jQuery.data(element, key, value)
- /// 2: Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.
- /// 2.1 - jQuery.data(element, key)
- /// 2.2 - jQuery.data(element)
- /// </summary>
- /// <param name="elem" domElement="true">
- /// The DOM element to associate with the data.
- /// </param>
- /// <param name="name" type="String">
- /// A string naming the piece of data to set.
- /// </param>
- /// <param name="data" type="Object">
- /// The new data value.
- /// </param>
- /// <returns type="jQuery" />
-
- if (!jQuery.acceptData(elem)) {
- return;
- }
-
- var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache,
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[jQuery.expando] : elem[jQuery.expando] && jQuery.expando;
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ((!id || (pvt && id && !cache[id][internalKey])) && getByName && data === undefined) {
- return;
- }
-
- if (!id) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if (isNode) {
- elem[jQuery.expando] = id = ++jQuery.uuid;
- } else {
- id = jQuery.expando;
- }
- }
-
- if (!cache[id]) {
- cache[id] = {};
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if (typeof name === "object") {
- if (pvt) {
- cache[id][internalKey] = jQuery.extend(cache[id][internalKey], name);
- } else {
- cache[id] = jQuery.extend(cache[id], name);
- }
- }
-
- thisCache = cache[id];
-
- // Internal jQuery data is stored in a separate object inside the object's data
- // cache in order to avoid key collisions between internal data and user-defined
- // data
- if (pvt) {
- if (!thisCache[internalKey]) {
- thisCache[internalKey] = {};
- }
-
- thisCache = thisCache[internalKey];
- }
-
- if (data !== undefined) {
- thisCache[name] = data;
- }
-
- // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
- // not attempt to inspect the internal events object using jQuery.data, as this
- // internal data object is undocumented and subject to change.
- if (name === "events" && !thisCache[name]) {
- return thisCache[internalKey] && thisCache[internalKey].events;
- }
-
- return getByName ? thisCache[name] : thisCache;
- };
- jQuery.dequeue = function (elem, type) {
- /// <summary>
- /// Execute the next function on the queue for the matched element.
- /// </summary>
- /// <param name="elem" domElement="true">
- /// A DOM element from which to remove and execute a queued function.
- /// </param>
- /// <param name="type" type="String">
- /// A string containing the name of the queue. Defaults to fx, the standard effects queue.
- /// </param>
- /// <returns type="jQuery" />
-
- type = type || "fx";
-
- var queue = jQuery.queue(elem, type),
- fn = queue.shift();
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if (fn === "inprogress") {
- fn = queue.shift();
- }
-
- if (fn) {
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if (type === "fx") {
- queue.unshift("inprogress");
- }
-
- fn.call(elem, function () {
- jQuery.dequeue(elem, type);
- });
- }
-
- if (!queue.length) {
- jQuery.removeData(elem, type + "queue", true);
- }
- };
- jQuery.dir = function (elem, dir, until) {
-
- var matched = [],
- cur = elem[dir];
-
- while (cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery(cur).is(until))) {
- if (cur.nodeType === 1) {
- matched.push(cur);
- }
- cur = cur[dir];
- }
- return matched;
- };
- jQuery.each = function (object, callback, args) {
- /// <summary>
- /// A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
- /// </summary>
- /// <param name="object" type="Object">
- /// The object or array to iterate over.
- /// </param>
- /// <param name="callback" type="Function">
- /// The function that will be executed on every object.
- /// </param>
- /// <returns type="Object" />
-
- var name, i = 0,
- length = object.length,
- isObj = length === undefined || jQuery.isFunction(object);
-
- if (args) {
- if (isObj) {
- for (name in object) {
- if (callback.apply(object[name], args) === false) {
- break;
- }
- }
- } else {
- for (; i < length; ) {
- if (callback.apply(object[i++], args) === false) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if (isObj) {
- for (name in object) {
- if (callback.call(object[name], name, object[name]) === false) {
- break;
- }
- }
- } else {
- for (var value = object[0];
- i < length && callback.call(value, i, value) !== false; value = object[++i]) { }
- }
- }
-
- return object;
- };
- jQuery.easing = {};
- jQuery.error = function (msg) {
- /// <summary>
- /// Takes a string and throws an exception containing it.
- /// </summary>
- /// <param name="msg" type="String">
- /// The message to send out.
- /// </param>
-
- throw msg;
- };
- jQuery.etag = {};
- jQuery.event = { "global": {},
- "props": ['altKey', 'attrChange', 'attrName', 'bubbles', 'button', 'cancelable', 'charCode', 'clientX', 'clientY', 'ctrlKey', 'currentTarget', 'data', 'detail', 'eventPhase', 'fromElement', 'handler', 'keyCode', 'layerX', 'layerY', 'metaKey', 'newValue', 'offsetX', 'offsetY', 'pageX', 'pageY', 'prevV…
Large files files are truncated, but you can click here to view the full file