Javascript examples for jQuery Method and Property:html
Add dynamic html parent using wrap
<html> <head> <title>Timeago Test</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.10.1.js"></script> <script type="text/javascript"> $(window).load(function(){/* www. j a v a 2 s . c om*/ $('p').wrapAll('<div class="paragraph"></div>') }); </script> </head> <body> <p>1</p> <p>2</p> <p>3</p> <p>4</p> </body> </html>