jquery document Operation method with jquery property operation method with jquery CSS action function

Source: Internet
Author: User

How to manipulate jquery documents

These methods are applicable for both XML documents and HTML documents, except for: HTML ().

Method description

AddClass () adds the specified class name to the matching element.

After () inserts the content after the matched element.

Append () Appends content to the matching element.

AppendTo () appends content to the matching element.

attr () Sets or returns the attributes and values of the matching element.

Before () inserts the content before each matching element.

Clone () Creates a copy of the matching element collection.

Detach () Removes a collection of matching elements from the DOM.

Empty () deletes all the child nodes in the matching element collection.

Hasclass () checks whether the matching element owns the specified class.

HTML () Sets or returns the HTML content in the matching element collection.

InsertAfter () inserts a matching element behind another specified set of elements.

InsertBefore () inserts a matching element in front of another specified collection of elements.

Prepend () to each matched element within the predecessor content.

Prependto () to each matched element within the predecessor content.

Remove () removes all matching elements.

Removeattr () removes the specified attribute from all matching elements.

Removeclass () Removes all or the specified classes from all matching elements.

ReplaceAll () Replaces all matching elements with matching elements.

ReplaceWith () replaces the matching element with the new content.

Text () Sets or returns the contents of the matching element.

Toggleclass () Adds or removes a class from the matching element.

Unwrap () removes and replaces the parent element of the specified element.

Val () Sets or returns the value of the matching element.

Wrap () wraps the matched element with the specified content or element.

Wrapall () wraps all matching elements with the specified contents or elements.

Wrapinner () wraps the child content of each matched element with the specified content or element.

JQuery Attribute Action method

Here are some ways to get or set the DOM property of an element.

These methods are applicable for both XML documents and HTML documents, except for: HTML ().

Method description

AddClass () adds the specified class name to the matching element.

attr () Sets or returns the attributes and values of the matching element.

Hasclass () checks whether the matching element owns the specified class.

HTML () Sets or returns the HTML content in the matching element collection.

Removeattr () removes the specified attribute from all matching elements.

Removeclass () Removes all or the specified classes from all matching elements.

Toggleclass () Adds or removes a class from the matching element.

Val () Sets or returns the value of the matching element.

JQuery CSS Manipulation functions

CSS Property Description

CSS () Sets or returns the style properties of the matching element.

Height () Sets or returns the heights of the matching elements.

Offset () returns the position of the first matching element relative to the document.

OffsetParent () returns the nearest positioned ancestor element.

Position () returns the position of the first matching element relative to the parent element.

ScrollLeft () Sets or returns the offset of the matching element at the top of the scroll bar.

ScrollTop () Sets or returns the offset of the matching element to the left of the scroll bar.

Width () Sets or returns the widths of the matching elements

jquery document Operation method with jquery property operation method with jquery CSS action function

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.