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/3.3.1/jquery.min.js"></script>
- <script>
- $(document).on('click','#massmodal', function() {
- $(carousel).append("<br>Hello world!<br>como esta tu<br>");
- });
- $(document).on('click','#reeplamodal', function() {
- $(carousel).replaceWith("<ul id='carousel'>Hello world!<br>como esta tu<br></ul>");
- //para eliminar utilizar
- //$(carousel).remove();
- });
- </script>
- </head>
- <body>
- <div>hola como esta tu
- <ul id="carousel">hola como esta tu</ul>
- </div>
- <button id="massmodal">AƱadir</button>
- <button id="reeplamodal">replazar</button>
- </body>
- </html>
Add Comment
Please, Sign In to add comment