0

I'm having trouble getting this version of the vTicker plugin to work for me, even though the instructions were absurdly simple.

I'm probably missing something obvious, but I installed the JQuery vTicker plugin, loaded JQuery 1.7.2 and created the necessary element whose ID the plugin can grab, but my outputted elements aren't being manipulated by the JQuery.

See this fiddle, where my html is as follows.

<div id="ticker">
  <ul>
    <li>One fish, two fish, red fish, blue fish.</li>
    <li>Four fish, five fish, jump fish, dive fish.</li>
    <li>Six fish, seven fish... what? Eleven fish?</li>
  </ul>
</div>

<script>
  $(function() {
    $('#ticker').vTicker();
  });
</script>
Orun
  • 4,383
  • 3
  • 26
  • 44

1 Answers1

1

This code works - check your code to see what is different:

<!DOCTYPE html>
<html>
<head>
  <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
  <script src="http://richhollis.github.com/vticker/downloads/jquery.vticker.js?v=1.13"></script>
</head>
<body>

  <div id="ticker">
    <ul>
    <li>One fish, two fish, red fish, blue fish.</li>
    <li>Four fish, five fish, jump fish, dive fish.</li>
    <li>Six fish, seven fish... what? Eleven fish?</li>
    </ul>
  </div>

  <script>
    $(function() {
      $('#ticker').vTicker();
    });
  </script>

</body>
</html>
RidingTheRails
  • 1,105
  • 1
  • 12
  • 22
  • Thanks, I got it to work here: http://jsfiddle.net/orvn/GhWkT/2/ by switching the JQuery to "No Wrap - in " instead of onLoad. Any idea why this would happen? – Orun Sep 27 '13 at 18:04
  • Nevermind, it looks for the JQuery in the , so wrapping it in an onLoad window event doesn't work. – Orun Sep 27 '13 at 18:07
  • 1
    It's to do with how the page is loaded/evaluated. If you want to use onLoad then move the $('#ticker').vTicker(); line into the same block as the plugin code - http://jsfiddle.net/GhWkT/5/ – RidingTheRails Sep 27 '13 at 20:00