jquery wrapp elemetn with tag

Solutions on MaxInterview for jquery wrapp elemetn with tag by the best coders in the world

showing results for - "jquery wrapp elemetn with tag"
Hunter
13 Jan 2018
1<!doctype html>
2<html lang="en">
3<head>
4  <meta charset="utf-8">
5  <title>wrap demo</title>
6  <style>
7  div {
8    border: 2px solid blue;
9  }
10  p {
11    background: yellow;
12    margin: 4px;
13  }
14  </style>
15  <script src="https://code.jquery.com/jquery-3.5.0.js"></script>
16</head>
17<body>
18 
19<p>Hello</p>
20<p>cruel</p>
21<p>World</p>
22 
23<script>
24$( "p" ).wrap( "<div></div>" );
25</script>
26 
27</body>
28</html>
29