Javascript examples for jQuery Method and Property:children
Jquery removing children element
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.2.js"></script> <script type="text/javascript"> $(window).load(function(){/*w w w . j av a 2s . c o m*/ $("div").children("p,div").remove(); }); </script> </head> <body> <div> <p>Hello</p> <h1>Stack Overflow</h1> <div> This is a wonderful site </div> </div> </body> </html>