title: JS Not Running Locally - Works On JSFiddle - JQuery Tubeplayer
body: <p>Using the JQuery plugin <a href="http://www.tikku.com/jquery-youtube-tubeplayer-plugin" rel="nofollow">Tubeplayer</a>, I'm able to get the currentTime of a YouTube video to display correctly on jsfiddle in chrome and in firefox locally. In chrome locally, start, stop and videoURL works properly while currentTime displays 0 (it should update as the video plays, like it does in the fiddle).<br><br>
  <b>Question:</b>
  Why does the javascript work on <a href="http://jsfiddle.net/Lny4Q/1/" rel="nofollow">jsfiddle</a> in chrome, but not locally?<br><br>
  Other posts have suggested wrapping the code in</p>
  
  <pre><code>$(function(){
      //code
  });
  </code></pre>
  
  <p>but it doesn't seem to affect it, for me.<br>
  Here is the code from my index.html - what is running locally:</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;tubeplayer&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id='player'&gt;&lt;/div&gt;
  &lt;button id="play"&gt;PLAY&lt;/button&gt;
  &lt;button id="pause"&gt;PAUSE&lt;/button&gt;
  &lt;button id="time"&gt;Current time&lt;/button&gt;
  &lt;button id="url"&gt;Video URL&lt;/button&gt;
  &lt;div id="display"&gt;&lt;/div&gt;
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://www.tikku.com/scripts/ui/tubeplayer/jQuery.tubeplayer.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(function(){
      var video_id = '9BkBGdnUNSk';
      $("#player").tubeplayer({
          width: 560, // the width of the player
          height: 315, // the height of the player
          initialVideo: video_id
      });
      $('#pause').click(function(){
          $('#player').tubeplayer("pause");
      });
      $('#play').click(function(){
          $('#player').tubeplayer("play");
      });
      $('#time').click(function(){
          $('#display').text($("#player").tubeplayer("data").currentTime);
      });
      $('#url').click(function(){
          $('#display').text($("#player").tubeplayer("data").videoURL);
      });
  });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Your help is appreciated. Thank you!</p>