سؤال

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>
هل كانت مفيدة؟

المحلول

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>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top