Prev Demo
jQuery
>
.Wrap() - Wrap A Specific Element
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> </head> <body> <p id="divP" style="height:300px;width:500px;background:#efefef;"> This is looking nice. </p> <script> $("#divP").wrap("<div id='divScroll' style='height:100px;width:300px;overflow:scroll;'></div>"); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output