Sanjay Cruze Sanjay Cruze - 1 year ago 106
HTML Question

Jquery/javascript not working

I'm new to creating websites, and am unsure as to why I can't get jquery/javascript to work. I'm trying to make a page which has dynamic tabs, copied from My current file is as follows,

<div id="doclist">
<ul id="documents">
<li><a href="#" rel="Document1" title="Content of Document1">Document1</a></li>
<li><a href="#" rel="Document2" title="Content of Document2">Document2</a></li>
<li><a href="#" rel="Document3" title="Content of Document3">Document3</a></li>
<li><a href="#" rel="Document4" title="Content of Document4">Document4</a></li>
<li><a href="#" rel="Document5" title="Content of Document5">Document5</a></li>
</ul></div><div id="wrapper">
<ul id="tabs">
<!-- Tabs go here -->
<div id="content">
<!-- Tab content goes here -->

<script type="text/javascript" src="">
$( document ).ready(function() {
console.log( 'ready!' );

For some reason, I cannot see "ready!" in the browser console. I have checked a couple other pages and I feel I am missing something basic, but being so new to this I can't see it. Thanks in advance for your help.

Kld Kld
Answer Source

You need to use tow javascript tags one for to load the jQuery and an other one for your code.

<script type="text/javascript" src=""></script>
$( document ).ready(function() {
    console.log( 'ready!' );
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download