Home >Web Front-end >JS Tutorial >How to insert a new element outside each matching element_jquery

How to insert a new element outside each matching element_jquery

WBOY
WBOYOriginal
2016-05-16 17:07:531145browse
1. Method

wrap: wrap all matching elements with the structure of other elements

wrapAll: wrap all matching elements with a single element

wrapInner: Wrap the subclass of the matching element with an html structure

2. Examples

(1) wrap
Copy code The code is as follows:



< head>

Insert title here








firebug displays the results:
Copy code The code is as follows:





Insert title here




a>liuxingyu liuxingyu liuxingyu




firebug displays the result:

Copy the code The code is as follows:




Insert title here







firebug显示结果:
复制代码 代码如下:





Insert title here






Statement:
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
Previous article:Sharing exception handling methods in JS_javascript skillsNext article:Sharing exception handling methods in JS_javascript skills

Related articles

See more