Everyone_Else Everyone_Else - 1 year ago 73
Javascript Question

Console.log not working javascript/jquery

I am trying to get started with javascript, but I can't see to get console.log to work.

In the

, I load jquery as follows:

<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>

Then, right before the end of
, I place the document.ready function as follows:

$( document ).ready(function() {
console.log( "ready!" );

No other javascript/jquery is present in the file. I expected the phrase "ready!" to be logged to the console, but instead, nothing happened. How can I fix this?

Answer Source

you need to wrap your code in a <script> tag

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download