Home  >  jQuery

Example of .detach() in jQuery

May 01, 2013
.detach() in Jquery is called on any event. .detach() detaches the element from HTML Document and that element disappears. Synatx is
Sample example is given below.

<!DOCTYPE html>
<style>p { background:yellow; margin:6px 0; } </style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<p>This is jQuery page.</p>
<button id="detach">Detach paragraphs</button>
var p;



©2022 concretepage.com | Privacy Policy | Contact Us