Solved

please see what is wrong with my jquery code

Posted on 2012-04-07
6
207 Views
Last Modified: 2012-04-22
Hi I am just learning a bit of jquery.

Can someone please advise what is wrong with my code below?

thanks


<html>
      <head>
            <title>Follow me!</title>
            <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
            <script type="text/javascript">
                  $(function() {
                        $("<p>Hi there!</p>").insertAfter("#followMe");
                  });
            </script>
      </head>
      <body>
            <p id="folowMe"></p>
      </body>
</html>
0
Comment
Question by:jecommera
  • 3
  • 3
6 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 37819058
followMe vs folowMe

you miss one << l >> in the
<p id="folowMe"></p>

Open in new window

should be :
<p id="followMe"></p>

Open in new window

0
 

Author Comment

by:jecommera
ID: 37819062
thanks, however I still get the no paragraph added
<html>
      <head>
            <title>Follow me!</title>
            <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
            <script type="text/javascript">
                  $(function() {
                        $("<p>Hi there!</p>").insertAfter("#followMe");
                  });
            </script>
      </head>
      <body>
            <p id="followMe"></p>
      </body>
</html>
0
 
LVL 82

Expert Comment

by:leakim971
ID: 37819078
maybe you need to refresh/clear your cache : http://jsfiddle.net/avdQE/
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:jecommera
ID: 37819102
Hi,

This is front end local host.
Does the code run on your computer?
0
 

Author Comment

by:jecommera
ID: 37819104
actually its working fine now.

By the way what is that jsfiddle site you are using above?
0
 
LVL 82

Expert Comment

by:leakim971
ID: 37819144
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Debugging step-by-step Jquery/Javascript 6 67
What is assert.deepEqual? 4 46
Angular - break the dataset in chunks? 7 50
jquery datepciker end date add 6 days 6 34
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question