Home > Web Front-end > JS Tutorial > body text

What does the jQuery wrap() method mean?

爱喝马黛茶的安东尼
Release: 2019-08-17 10:35:36
Original
3696 people have browsed it

What does the jQuery wrap() method mean?

##Related introduction to the jQuery wrap() method:

Definition and Usage

The wrap() method wraps each selected element with the specified HTML element.

Related recommendations: "

js tutorial"

Grammar

$(selector).wrap(wrappingElement,function(index))
Copy after login

What does the jQuery wrap() method mean?

Example

Wrap each

element in a

element:

$("button").click(function(){
    $("p").wrap("<div></div>");
});
Copy after login

The above is the detailed content of What does the jQuery wrap() method mean?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template