JQuery Html/css method

Source: Internet
Author: User

JqueryHtml/css MethodJQuery Html/css method

The following table lists all the jQuery methods used to work with HTML and CSS.

The following methods apply to HTML and XML documents. Except for: HTML () method.

Method Description
AddClass () Add one or more class names to the selected element
After () Insert content after selected element
Append () Inserts the content at the end of the selected element
AppendTo () Inserts an HTML element at the end of the selected element
attr () Sets or returns the attribute/value of the selected element
Before () Insert content before selected element
Clone () Generate a copy of the selected element
CSS () Sets or returns one or more style properties for the selected element
Detach () Remove selected elements (preserve data and events)
Empty () Removes all child nodes and content from the selected element
Hasclass () Checks whether the selected element contains the specified class name
Height () Sets or returns the height of the selected element
HTML () Sets or returns the contents of the selected element
Innerheight () Returns the height of the element (contains padding, not including border)
Innerwidth () Returns the width of the element (contains padding, not including border)
InsertAfter () Inserts an HTML element after the selected element
InsertBefore () Inserts an HTML element before the selected element
Offset () Sets or returns the offset coordinates of the selected element (relative to the document)
OffsetParent () Returns the first positioned ancestor element
Outerheight () Returns the height of the element (contains padding and border)
Outerwidth () Returns the width of the element (contains padding and border)
Position () Returns the position of the element (relative to the parent element)
Prepend () Insert content at the beginning of the selected element
Prependto () Inserts an HTML element at the beginning of the selected element
Prop () Sets or returns the attribute/value of the selected element
Remove () Remove selected elements (containing data and events)
Removeattr () Removes one or more properties from the selected element
Removeclass () Remove one or more classes from the selected element
Removeprop () To remove a property set by the prop () method
ReplaceAll () Replace the selected element with a new HTML element
ReplaceWith () Replace selected elements with new content
ScrollLeft () Sets or returns the horizontal scroll bar position of the selected element
ScrollTop () Sets or returns the position of the vertical scroll bar of the selected element
Text () Sets or returns the text content of the selected element
Toggleclass () Toggle between adding/removing one or more classes in the selected element
Unwrap () Removes the parent element of the selected element
Val () Sets or returns the attribute value of the selected element (for form elements)
Width () Sets or returns the width of the selected element
Wrap () Wrap around each selected element with an HTML element
Wrapall () Wrap around all the selected elements with HTML elements
Wrapinner () Wrapped around the contents of each selected element with HTML elements.

JQuery Html/css method

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.