Click a header to add another using jquery
HTML Code :
<!DOCTYPE html> <html> <head> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <meta charset="utf-8"> <title>JS Bin</title> </head> <body> <h1>Click me to add another!</h1> </body> </html>
JavaScript Code :
$("body").delegate( "h1", "click", function() { $(this).after( "<h1>Another header!</h1>" ); });
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
HTML Code :
JavaScript Code :