Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • jQuery DOM manipulation methods

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 279
    Comment on it

    The following table provides list of all the methods that are used to manipulate the HTML and CSS.

     

    Except html() method all other methods below work for both HTML and XML documents.

     

    Method Description                          
    wrap() Wraps HTML element(s) around each selected elements
    wrapInner() Wrap HTML element(s) around the content of each selected element
    wrapAll() Wraps HTML element(s) around all selected elements
    unwrap() Removes the parent element of the selected elements
    width() Sets or returns the width of selected elements
    height() Sets or returns the height of selected elements
    val() Sets or returns the value attribute of the selected elements (for form elements)
    text() Sets or returns the text content of selected elements
    html() Sets or returns the content of selected elements
    hasClass() Checks if any of the selected elements have a specified class name
    empty() Removes all child nodes and content from selected elements
    remove() Removes the selected elements (including data and events)
    removeAttr() Removes one or more attributes from selected elements
    removeClass() Removes one or more classes from selected elements
    removeProp() Removes a property set by the prop() methods
    detach() Removes selected elements (keeps data and events)
    addClass() Adds one or more class names to selected elements.
    after() Inserts content after selected elements
    append() Inserts content at the end of selected elements
    appendTo() Inserts HTML elements at the end of selected elements  
    attr() Sets or returns attributes/values of selected elements
    before() Inserts content before selected elements
    clone() Makes a copy of selected elements
    css() Sets or returns one or more style properties for selected elements
    innerHeight() Returns the height of an element (includes padding, but not border)
    innerWidth() Returns the width of an element (includes padding, but not border)
    insertAfter() Inserts HTML elements after selected elements
    insertBefore() Inserts HTML elements before selected elements
    offset() Sets or returns the offset coordinates for selected elements (relative to the document)
    offsetParent() Returns the first positioned parent element
    outerHeight() Returns the height of an element (includes padding and border)
    outerWidth() Returns the width of an element (includes padding and border)
    position() Returns the position (relative to the parent element) of an element
    prepend() Inserts content at the beginning of selected elements
    prependTo() Inserts HTML elements at the beginning of selected elements
    prop() Sets or returns properties/values of selected elements
    scrollLeft() Sets or returns the horizontal scrollbar position of selected elements
    scrollTop() Sets or returns the vertical scrollbar position of selected elements
    toggleClass() Toggles between adding/removing one or more classes from selected elements

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: