Author: admin
-
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…
-
jQuery attr()
The jQuery attr() method is used to set or return attributes and values of the selected elements. There are two usage of jQuery attr() method. Syntax: To return an attribute’s value: To set an attribute and value: To set an attribute and value by using a function: To set multiple attributes and values: Parameters of…
-
jQuery remove
The jQuery remove() method is used to remove the selected elements out of the DOM. It removes the selected element itself, as well as everything inside it (including all texts and child nodes). This method also removes the data and the events of the selected elements. If you want to remove elements without removing data…
-
jQuery clone
The jQuery clone() method is used to make copies of the set of matched elements. It also makes copies of their child nodes, texts and attributes. The clone() method is a convenient way to duplicate elements on a page. Syntax: Parameters of jQuery clone() method Parameter Description True It specifies that event handlers also should…