Javascript examples for jQuery:Text
Use after() method to add the text "How are you?" after the <p> element.
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("p").after("How are you?"); });// ww w . j a va2 s . c o m </script> </head> <body> <p>Hello?</p> </body> </html>