dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: I am getting following error please help me

  1. #1
    Join Date
    Jun 2012
    Posts
    5

    Question I am getting following error please help me

    I am beginner, learning jQuery I am getting error which says that jQuery is not defined , anyone please help me to get out of this frustration. I saved the following code as .html file but it is not displaying the desired results.




    <html>
    <head>
    <script type="text/javascript">


    jQuery("p").addClass("ohmy").show("slow");
    </script>



    <style>
    .ohmy{
    background-color:blue;
    color:red;
    }


    </style>
    </head>
    <body>

    <p class="neat" style="display:none;">
    congratulation
    </p>



    </body>
    </html>

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,674
    1. where is the jQuery itself? ))
    2. where is $(document).ready(...); ?

  3. #3
    Join Date
    Aug 2006
    Posts
    301
    you need to include a script tage with src='jquery.js' before you create the script tag with your javascript code, and you don't need to use jquery(), you can use $("p").addClass("ohmy").show("slow");

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles