The basic API for jquery

Source: Internet
Author: User

This article has compiled some of the major jquery APIs, including jquery core functions and methods, jquery Property reference manuals, jquery CSS operations, jquery selectors, jquery document operations, jquery filtering operations, jquery event methods, jquery effects, jquery ajax operations, jquery tool functions, jquery event objects, jquery delay objects, jquery callback functions, welcome to the collection. The jquery core function function describes jquery () This function receives a string containing a CSS selector and then uses that string to match a set of elements. jquery () 1.8* dynamically creates DOM elements wrapped by jquery objects based on the supplied original HTML tag string. Set up a series of properties, events, and so on. JQuery () $ (document) shorthand for Ready (). Jquery.holdready () 1.6+ pause or resume the execution of the. Ready () event. Each () executes a function with each matching element as the context. Size () The number of elements in the JQuery object. The number of elements in the length JQuery object. Selector returns the original selector passed to jquery (). The context returns the original DOM node content passed to jquery (), which is the second parameter of jquery (). If not specified, then the context points to the current document. Get () gets one of the matching elements. Num represents the element that gets the first few matches. Index () searches for the matching element and returns the index value of the corresponding element, counting from 0. Data () is stored on the element and returns the JQuery object. Removedata () 1.7* removes the stored data on the element queue () display or operation on the matching element to execute the function queues Dequeue () remove a queue function from the front end of the queue and execute him. Clearqueue () empties all queue jQuery.fn.extend () that have not yet been executed on the object to extend the JQuery element set to provide new methods (usually used to make plug-ins). Jquery.extend () extends the jquery object itself. Jquery.noconflict () runs this function to pass control of the variable $ to the first library that implements it.                jquery Property Functions                Describes attr () setting or returning the property value of the selected element. Removeattr () removes an attribute from each matching element prop () 1.6+ Gets the property value of the first element in the matching element set. Removeprop () 1.6+ is used to remove the property set set by the. Prop () method AddClass () to add the specified class name for each matching element. Removeclass () Removes all or the specified classes from all matching elements. Toggleclass () deletes (adds) a class if it exists (does not exist). HTML () Gets the HTML content of the first matching element. This function cannot be used with XML documents. But it can be used in XHTML documents. Text () Gets the contents of all matching elements. Val () Gets the current value of the matching element. The JQuery CSS action lists the following methods to set or return the CSS-related properties of the element. The function describes CSS () 1.9* to access the style attributes of the matching element. Jquery.csshooks adds a hook directly to JQuery to override the method used to set or get a particular CSS property, either to standardize the CSS property name or to create a custom property. Offset () Gets the relative offset of the matching element at the current viewport. Position () Gets the offset of the matching element relative to the parent element. ScrollTop () Gets the offset from the top of the scrollbar relative to the element. ScrollLeft () Gets the offset to the left of the matching element relative to the scrollbar. Heigh () Gets the height value (px) of the current calculation of the matching element. Width () Gets the value (px) of the current calculation for the first matching element. Innerheight () Gets the inner area height of the first matching element, including padding, excluding borders. Innerwidth () Gets the inner area width of the first matching element, including padding, excluding borders. Outerheight () Gets the outer height of the first matching element (including padding and borders by default). Outerwidth () Gets the outer width of the first matching element (including padding and borders by default). jquery selector function describes #id element. class * Selector1,selector2,selectorn ancestor descendant PA Rent > CHild prev + Next prev ~ siblings:first:not (): Even:odd:eq (): GT (): lang1.9+: Last:lt (): Header: animated:focus1.6+: root1.9+: target1.9+: Contains (): Empty:has ():p arent:hidden:visible [attribute] [attrib Ute=value] [Attribute!=value] [attribute^=value] [attribute$=value] [attribute*=value] [attrsel1][attrsel2][ Attrseln]: first-child:first-of-type1.9+: last-child:last-of-type1.9+: Nth-child:nth-last-child () 1.9+: Nth-la St-of-type () 1.9+: Nth-of-type () 1.9+: only-child:only-of-type1.9+: Input:text:p ASSWORD:RADIO:CHECKBOX:SUBM                                it:image:reset:button:file:hidden:enabled:d isabled:checked:selectedjQuery Document manipulation functions Describes append () appends content to each matching element. AppendTo () Appends all matching elements to another specified set of element elements. Prepend () to each matched element within the predecessor content. Prependto () puts all matching elements in front of another, specified set of element elements. After () inserts the content after each matching element. Before () inserts the content before each matching element. InsertAfter () Inserts all matching elements behind another, specified set of element elements. InsertBefore () Inserts all matching elements into another, before the specified set of element elementsSurface. Wrap () wraps all matching elements with a structured tag of other elements. Unwrap () This method moves the parent element out of the element. Wrapall () wraps all matching elements together with a single element Wrapinner () wraps the child content of each matching element (including the text node) with an HTML structure replacewith () replaces all matching elements with the specified HTML or DOM elements. ReplaceAll () replaces all selector matching elements with matching elements. Empty () deletes all the child nodes in the matching element collection. Remove () removes all matching elements from the DOM. Detach () removes all matching elements from the DOM. Clone () clones the matching DOM elements and selects copies of those clones. The jquery filter operation function describes the EQ () gets the nth element first () gets the last element () gets the final element hasclass () to check whether the current element contains a particular class, if any , true is returned. Filter () filters out the collection of elements that match the specified expression. Is () 1.6* detects a collection of matching elements based on a selector, DOM element, or JQuery object, and returns true if at least one of the elements conforms to the given expression. Map () Converts a set of elements into other arrays (whether or not an array of elements) has () retains elements containing specific descendants, removing those elements that do not contain the specified descendants. Not () removes the element that matches the specified expression slice () picks a matching subset children () gets a collection of elements that contains all the child elements of each element in the matching element collection. Closest () 1.7* begins with the element itself, successively matches the ancestor element, and returns the first matching element. Find () 1.6* searches for all elements that match the specified expression. This function is a good way to find out the descendant elements of the element being processed. Next () Gets a collection of elements that contain a matching set of elements that are immediately behind each element in the next sibling element. Nextall () finds all sibling elements after the current element. Nextuntil () 1.6* finds all sibling elements after the current element until the matching element is encountered. OffsetParent () Returns the parent node that the first matching element is used for positioning. Parent () Gets a collection of elements that contain the unique parent element for all matching elements. Parents() gets a collection of elements (without root elements) that contains the ancestor elements of all matching elements. You can filter by an optional expression. Parentsuntil () 1.6* finds all the parent elements of the current element until it encounters the matching element. Prev () Gets a collection of elements that contain the first sibling element that is immediately adjacent to each element in the matching element collection. Prevall () finds all sibling elements before the current element Prevuntil () 1.6* finds all sibling elements before the current element until the matching element is encountered. Siblings () Gets a collection of elements that contain all the unique sibling elements of each element in the matching element collection. You can filter by using an optional expression. Add () Adds the element that matches the expression to the jquery object. This function can be used to concatenate the result set of an element that matches two expressions respectively. Andself () joins the previously selected join in the current element contents () finds all child nodes within the matching element (including text nodes). If the element is an IFRAME, look for the document content end () back to the most recent "destructive" operation. That is, the list of matched elements changes to the previous state. The jquery event method function describes ready () to bind a function to execute when the DOM is loaded in readiness to be queried and manipulated. On () 1.7+ an event handler that is bound to one or more events on the selection element. Off () 1.7+ an event handler that removes one or more events on the selection element. Bind () binds event handlers for specific events of each matching element. One () binds a single-pass event handler for a specific event (like click) for each matching element. Trigger () triggers a class of events on each matched element. Triggerhandler () This particular method will trigger the handler function for all bindings on the specified event type. However, the browser default action is not performed and event bubbling does not occur. Unbind () The reverse operation of BIND () removes the bound event from each matching element. Live () 1.7-jquery attaches an event handler to all matching elements, even if the element is added later. Die () 1.7-Removes all events previously bound with. Live () from the element. (This method is exactly the opposite of live.) ) delegate () The specified element (the child element of the selected element) adds one or more event handlers and specifies the function to run when these events occur. UndeLegate () 1.6* deletes one or more event handlers added by the delegate () method. Hover () a method that mimics the hover event (moving the mouse over an object and moving out of the object). Toggle () is used to bind two or more event handler functions in response to the selected element's rotation click event. Blur () triggers the blur event when the element loses focus. Change event occurs when the value of an element changes. Click () triggers the Click event for each matching element. DblClick () The DblClick event occurs when you double-click an element. Error () The Error event occurs when an element encounters an error (not loaded correctly). Focus () triggers a focus event when the element has the focus. Focusin () triggers the Focusin event when the element receives focus. Focusout () triggers the Focusout event when the element loses focus. KeyDown () The KeyDown event occurs when the keyboard or button is pressed. KeyPress () The KeyPress event occurs when the keyboard or button is pressed. KeyUp () The KeyUp event occurs when the button is released. It occurs on the element that is currently gaining focus. MouseDown () The MouseDown event occurs when the mouse pointer moves over the element and the mouse button is pressed. MouseEnter () The MouseEnter event occurs when the mouse pointer crosses an element. This event is most often used in conjunction with the MouseLeave event. MouseLeave () The MouseLeave event occurs when the mouse pointer leaves the element. This event is most often used in conjunction with the MouseEnter event. MouseMove () The MouseMove event occurs when the mouse pointer moves through the specified element. Mouseout () The Mouseout event occurs when the mouse pointer moves away from the element. MouseOver () The MouseOver event occurs when the mouse pointer is over the element. MouseUp () The MouseUp event occurs when the mouse button is relaxed on the element. Resize () The Resize event occurs when the size of the browser window is resized. Scroll () The Scroll event occurs when the user scrolls through the specified element. Select () text in the input element of the textarea or text typeWhen selected, a Select event occurs. Submit () A Submit event occurs when the form is submitted. Unload () Unload event occurs when the user leaves the page. The jquery effect function describes show () showing hidden matching elements. Hide () hides the displayed element toggle () is used to bind two or more event handler functions in response to the selected element's rotating click event. Slidedown () dynamically displays all matching elements by a height change (increasing downward), optionally triggering a callback function after the display is complete. Slideup () dynamically hides all matching elements by a height change (decrease up), optionally triggering a callback function after the hide is complete. Slidetoggle () Toggles the visibility of all matching elements through a height change, and optionally triggers a callback function after the switch is complete. FadeIn () implements the fade-in effect of all matching elements by changing the opacity, and optionally triggers a callback function after the animation is complete. FadeOut () Fades the fade effect of all matching elements by changing the opacity and optionally triggers a callback function after the animation is complete. FadeTo () Adjusts the opacity of all matching elements incrementally to the specified opacity, and optionally triggers a callback function after the animation is complete. Fadetoggle () Switches the fade-in and fade-out effects of all matching elements by changing the opacity, and optionally triggers a callback function after the animation is complete. Animate () 1.8* functions for creating custom animations. Stop () 1.7* stops all animations that are running on the specified element. Delay () sets a delay to defer execution of items after the queue. Finish () 1.9+ stops the currently running animation, removes all queued animations, and completes all animations that match the element. JQuery.fx.off closes all animations on the page. JQuery.fx.interval sets the display frame rate of the animation. The JQuery Ajax action function describes $.ajax () loading remote data over an HTTP request. Load () Loads the remote HTML file code and inserts it into the DOM. $.get () loads information through a remote HTTP GET request. $.getjson () loads JSON data through an HTTP GET request. $.getscript () through HTTP GET Request loads and executes a JavaScript file. $.post () loads information through a remote HTTP POST request. Ajaxcomplete () Executes the function when the AJAX request completes. Ajax events. Ajaxerror () An AJAX request executes a function when an error occurs. Ajax events. Ajaxsend () an AJAX request to execute the function before sending. Ajax events. Ajaxstart () executes the function at the beginning of the AJAX request. Ajax events. Ajaxstop () executes the function at the end of the AJAX request. Ajax events. Ajaxsuccess () Executes the function when the AJAX request succeeds. Ajax events.  $.ajaxprefilter () Handle custom Ajax options or modify existing options before each request was sent and before they are Processed by $.ajax (). $.ajaxsetup () sets the global Ajax default option. Serialize () Serializes the table contents to a string. Serializearray () Serializes tabular elements (similar to the '. Serialize () ' method) to return the JSON data structure.

The basic API for jquery

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.