Want to update text in <p> element
Hello, I am a JQuery newbie. I have been trying to perform a simple task of updating the text in <p> element after the page loads. Here is a very simple script and code I am using
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- p { color : blue; margin : 8px; }
- </style>
- <script src = "jquery-1.10.1.min.js"></script>
- </script>
- <title>My JQuery Tests </title>
- </head>
- <body>
- <p> My JQuery Tests On This Page </p>
- <script src = "application.js"></script>
- </body>
- </html>
I have downloaded the jquery-1.10.1.min.js and placed it in the directory where the above file is present. The application.js is as follows
- $(document).ready(function()i{
- ("p").text("Changed the Text through JQuery ! Huuray");
- });
I have tried to write the script in the original file but it didn't work. Please help me understand where I am going wrong.
Thanks.