<!DOCTYPE html>
<html>
<head>
<title>jQuery wrap() method</title>
<script src="jquery-latest.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").wrap("<div></div>");
});
});
</script>
<style type="text/css">
div{
background-color: pink;
border:1px dashed black;
text-align: center;
}
</style>
</head>
<body>
<p>First paragraph text</p>
<br />
<p>Second paragraph text</p>
<br />
<button>Click here to call wrap() method</button>
</body>
</html>