Category: HTML/CSS

  • jQuery unwrap

    The jQuery unwrap() method is used to remove the parent element of the selected elements. Syntax: Example of jQuery unwrap() method Let’s take an example to demonstrate the jQuery unwrap() method. jQuery unwrap() example 2 Let’s take an example which shows wrap() and unwrap() method together.

  • jQuery wrapAll

    jQuery wrapAll() method is used to wrap specified HTML elements around all selected elements, in a set of matched elements. Syntax: Parameters of jQuery wrapAll() method Parameter Description wrappingElement It is a mandatory parameter. It specifies the HTML elements that you wrap around the selected elements. Its possible values are:HTML elementsjQuery objectsDOM elements Example of…

  • jQuery wrapInner

    The jQuery wrapInner() method is used to wrap an HTML structure around the content of each element in the set of matched element. This method can accept any string or object that could be passed to the $() factory function. Syntax: Parameters of jQuery wrapInner() method Parameter Description wrappingElement It is a mandatory parameter. It…

  • jQuery wrap

    jQuery wrap() method is used to wrap specified HTML elements around each selected element. The wrap () function can accept any string or object that could be passed through the $() factory function. Syntax: Parameters of jQuery wrap() method Parameter Description WrappingElement It is a mandatory parameter. It specifies what HTML elements to wrap around…

  • jQuery outerHeight()

    The jQuery outerHeight () method is used to return the outer height of first matched element. This method includes padding and border both. In the above example, you can see that border and padding both are included in the outerHeight() method. Syntax: Parameters of jQuery outerHeight() method Parameter Description includeMargin This is a Boolean value…

  • jQuery width

    jQuery width() method is used to return or set the width of matched element. To return width: When this method is used to return the width, it returns the width of first matched element. To set width:When this method is used to set the width, it sets the width for every matched element. This method is…

  • jQuery toggleClass

    The jQuery toggleCLass() method is used to add or remove one or more classes from the selected elements. This method toggles between adding and removing one or more class name. It checks each element for the specified class names. If the class name is already set, it removes and if the class name is missing,…

  • jQuery addClass

    The addclass() method is used to add one or more class name to the selected element. This method is used only to add one or more class names to the class attributes not to remove the existing class attributes. If you want to add more than one class separate the class names with spaces. Syntax:…

  • jQuery position

    The jQuery position () method makes you able to retrieve the current position of an element relative to the parent element. It returns the position of the first matched element. This method returns the object with two properties: top and left position in pixels. The jQuery position() method is different from jQuery offset() method because…

  • jQuery prop

    jQuery prop() method is used for two purpose. The jQuery prop() method is generally used to retrieve property values i.e. DOM properties (like tagName, nodeName, defaultChecked) or own custom made properties. This is a very convenient way to set the values of properties, especially the multiple properties. If you want to retrieve HTML attributes, you…