<!DOCTYPE html>
<html>
<head>
<title>jQuery wrapAll() method</title>
<script src="jquery-latest.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").wrapAll("<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>
<p>Second paragraph text</p>
<br />
<button>Click here to call wrapAll() method</button>
</body>
</html>