Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
- <script>
- $(document).ready(function(){
- $("button").click(function(){
- var promptt=prompt("Enter Ammount Please:");
- for(var i=0;i<promptt;i++){
- $("*").contents().filter("*").wrap("<h1/>");
- }
- });
- });
- </script>
- </head>
- <body>
- <p>LOL</p>
- <button>Find all text nodes in div and wrap them</button><br>
- </body>
- </html>
Add Comment
Please, Sign In to add comment