Some of the method attributes that are not commonly used in jQuery [reprinted] And jquery attributes reprinted

Source: Internet
Author: User

Some of the method attributes that are not commonly used in jQuery [reprinted] And jquery attributes reprinted
Index (subject)

Search for the elements that match the object indicated by the parameter and return the index value of the corresponding element. If a matching element is found, return from 0; if no matching element is found, return-1.

Data ()

Data (elem): adds a unique identifier for a page object.

Data (name, value): stores data in a key of an element. $ ("# Box"). data ("shape", "rectangle ").

Data (name): Get the value. $ ("# Box"). data ("shape") // "rectangle ".

RemoveData (name): Delete the value assigned by the data () method. $ ("# Box"). removeData ("shape ").

Attr (key, fn)

Set a calculated attribute value for all matching elements. Instead of providing a value, a function is provided. The value calculated by this function is used as the attribute value.

HasClass (class)

Check whether the current element contains a specific class. If yes, true is returned. This is actually is ("." + class ).

Val (val)

Set the value of each matching element. In jQuery 1.2, this can also assign values to the select element. The value to be set for the val (String) parameter.

Check, select, and radio can all be used to assign values to them. The val (Array <String>) parameter is used for the check/select value.

Slice (start, [end])

Select a matched subset.

Add (expr)

Add the elements matching the expression to the jQuery object. This function can be used to connect the element result set that matches the two expressions respectively.

The expr (String, DOMElement, Array <DOMElement>) parameter is used to match an element and add an expression String, or to dynamically generate HTML code. If it is a String Array, multiple elements are returned.

NextAll ([expr])

Search for all elements after the current element.

Prev ([expr])

Obtains the Element Set of the first peer element next to each element in a matched element set.

PrevAll ([expr])

Find all peer elements before the current element.

AndSelf ()

Add the selected element to the current element.

ReplaceWith (content)

Replaces all matched elements with specified HTML or DOM elements. Parameter content (String, Element, jQuery): Used to replace matching elements.

ReplaceAll (selector)

Replace all elements matched by selector with matched elements. The selector parameter is used to find the element to be replaced.

Clone ([true])

Clone the matched DOM elements and select the cloned copies. The parameter [true] is a clone of all event processing of the object.

Offset ()

Obtains the relative offset of the matching element in the current view. The returned object contains two integer attributes: top and left. This method is only valid for visible elements.

Returns Object {top, left }.

One (type, [data], fn)

BindsOne-timeEvent processing functions.

On each object, this event processing function is executed only once. Other rules are the same as those of the bind () function. This event handler receives an event object, which can be used to prevent (browser) default behavior. If you want to cancel the default action and prevent event bubbles, the event handler function must return false.

Toggle (fn, fn2, [fn3, fn4,...])

Switch the function to be called each time you click. The number of functions can be multiple.

Stop ()

Stops all animations that are running on the specified element. If there are animations waiting for execution in the queue, they will be executed immediately.

Queue ([callback/queue])

Queue: returns the queue pointing to the First Matching Element (it will be a function array.

Queue (callback): adds a function to the animation queue of the matching element.

Queue (queue): replaces the animation queue of matching elements with a new queue (Function Array ).

Dequeue ()

Removes a queue function from an animation queue.

JQuery. browser. version

The version number of the browser rendering engine.

JQuery. boxModel

Whether the browser uses the standard box model to render the page on the current page.

PS: These method attributes were rarely used in the past, and many of them are unknown. This has nothing to do with the Chinese CHM version of jQuery API, and the popular Chinese version of the Manual has expired, it is recommended to read the official documentation directly.


The jQuery method is inexplicably "unsupported attributes or methods"

The jqueryzoom method is correct, or your js path is wrong, or the. jqzoom element is not an object that can be used.
 
How can I write multiple values for attributes of the jquery css method?

Certificate (this).css ({background-positionX: '000000', background-positionY: '0 '});

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.