title: jQuery TypeError: $("img").draggable(); is not a function
body: <p><strong>Hello, I have been having a problem with this code for the last 3 hours and I'm hoping someone is gonna be able to help me out here.</strong></p>
  
  <p><strong>jQuery</strong></p>
  
  <pre><code>$(document).ready(function() { 
  $("img").draggable();});
  </code></pre>
  
  <p><strong>HTML header</strong></p>
  
  <pre><code>&lt;head&gt;
      &lt;title&gt;Chess&lt;/title&gt;
      &lt;meta http-equiv="Content-type" content="text/html;charset=UTF-8"&gt;
      &lt;link rel="stylesheet" type="text/css" href="reset.css" /&gt;
      &lt;link rel="stylesheet" type="text/css" href="default.css"/&gt;
      &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="default.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p><strong>FireBug Error</strong></p>
  
  <pre><code>TypeError: $("img").draggable is not a function [Break On This Error] $("img").draggable();
  </code></pre>
  
  <p><strong>My code works perfectly on <a href="http://www.codecademy.com/" rel="noreferrer">codecademy.com</a> but when i try it on localhost or my server, i keep getting this error message. What am i doing wrong here?</strong></p>
  
  <p><strong>Complete HTML</strong></p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
   &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Chess&lt;/title&gt;
          &lt;meta http-equiv="Content-type" content="text/html;charset=UTF-8"&gt;
          &lt;link rel="stylesheet" type="text/css" href="reset.css" /&gt;
          &lt;link rel="stylesheet" type="text/css" href="default.css"/&gt;
          &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="default.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
       &lt;div id="board"&gt;
          &lt;ul id="first_row"&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Rook_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Pawn_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Pawn_White.png" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Rook_White.png" /&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;ul id="second_row"&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Knight_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Pawn_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Pawn_White.png" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Knight_White.png" /&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;ul id="third_row"&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Bishop_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Pawn_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Pawn_White.png" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Bishop_White.png" /&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;ul id="forth_row"&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Queen_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Pawn_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Pawn_White.png" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/King_White.png" /&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;ul id="fifth_row"&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/King_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Pawn_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Pawn_White.png" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Queen_White.png" /&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;ul id="sixth_row"&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Bishop_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Pawn_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Pawn_White.png" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Bishop_White.png" /&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;ul id="seventh_row"&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Knight_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Pawn_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Pawn_White.png" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Knight_White.png" /&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;ul id="eight_row"&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Rook_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Pawn_Black.png" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="#" /&gt;&lt;/li&gt;
              &lt;li class="black_space"&gt;&lt;img src="pieces/Pawn_White.png" /&gt;&lt;/li&gt;
              &lt;li class="white_space"&gt;&lt;img src="pieces/Rook_White.png" /&gt;&lt;/li&gt;
          &lt;/ul&gt;
       &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>