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
Release: 2016-05-16 17:07:53
Original
1132 people have browsed it
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






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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template