<!DOCTYPE html>
<html>
<head>
<title>jQuery detach() method</title>
<script src="jquery-latest.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").detach('#p2');
});
});
</script>
</head>
<body>
<div>
<p>First paragraph start here...</p>
<p id="p2">Second paragraph start here...</p>
</div>
<button>Click Me</button>
</body>
</html>