Angularjs Operation Dom--angular.element

Source: Internet
Author: User

Append ()-Inserts the parameter contents at the end of each matching element
attr ()-Gets the value of the property that matches the first element in the collection of elements
Bind ()-Binds an event handler for an element
Children ()-Gets the child elements of each element in the matching element collection, selector selective filter
Clone ()-Creates a copy of the deep copy of a matching set of elements
Contents ()-Gets the child elements of each element in the matching element collection, including the text and comment nodes
CSS ()-Gets the value of the style attribute that matches the first element in the collection of elements
Data ()-stores arbitrary related data on matching elements
Detach ()-Removes all matching elements from the DOM
Empty ()-Removes all child nodes from the DOM that match the elements in the collection
EQ ()-reduces the set of matching elements for the specified index of which element
Find ()-Gets the descendants of each element in the currently matched collection of elements through a selector, jquery object, or element filter
Hasclass ()-Determines whether any one of the matching elements has a given (style) class assigned
HTML ()-Gets the HTML content of the first matching element in the collection
Next ()-Gets a collection of elements that match each element in the collection of elements immediately following the sibling element. If a selector is provided, this element is returned only if the sibling element that follows it satisfies the selector
On ()-Bind one or more event handlers on the selected element
Off ()-Removes an event handler function
One ()-Adds a handler function for the event of the element. The handler function executes at most one time on each element of each event type
Parent ()-Gets a matching element in the collection, and can provide an optional selector for each element
Prepend ()-Inserts the contents of the parameter in front of each matching element (inside the element)
Prop ()-Gets the property value of the first element in a matching element set
Ready ()-Specifies a function to execute when the DOM is prepared
Remove ()-Removes a collection of matching elements from the DOM. (also remove events and jQuery data from the element.) )
Removeattr ()-Removes an attribute (attribute) for each element in the matching element collection
Removeclass ()-Removes the previous, multiple, or all styles from each matching element in the collection
Removedata ()-Removes the bound data on the element
ReplaceWith ()-Replaces all matching elements in the collection with the provided content and returns the collection of deleted elements
Text ()-Gets the merged text of each element in the matching element collection, including their descendants
Toggleclass ()-Adds or removes one or more style classes on each element of the matching element collection, depending on whether the style class exists or the value toggle property. That is, delete (add) A class if it exists (does not exist)
Triggerhandler ()-Performs all handlers attached to an element for an event
Unbind ()-Removes a previously attached event handler from the element
Val ()-Gets the current value of the first element in a matching element collection
Wrap ()-An HTML element on the outer package of each matching element

Take Removeclass as an example:

Html:

123 <divid="testID" class="test1">    <imgid="testID2" class="test2" src="some-image.gif" /></div>

Js:

1 angular.element(‘#testID2‘).find(’.test2‘).removeClass(’.test3‘);

  

Angularjs Operation Dom--angular.element

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.