шатер стоп нагрузки - PullRequest
       3

шатер стоп нагрузки

0 голосов
/ 21 февраля 2012

глупый вопрос, но я пробовал с и без javascript, и я не могу остановить выделение по умолчанию.

По сути, я хочу, чтобы они начали двигаться при mousover, но по умолчанию остановлены.

Я пробовал что-то вроде этого:

$.each($('.tracks_marquee'),function(){$(this).stop();}); //triggered on $.ready

<marquee class="tracks_marquee"
behavior="alternate"
scrolldelay="160"
onmouseover="this.start();"
onmouseout="this.stop();"
onload="this.stop();">
  some text here
</marquee>

но ничего не работает

1 Ответ

2 голосов
/ 21 февраля 2012

Попробуйте это

<marquee class="tracks_marquee" behavior="alternate" scrollamount="0"  >
  some text here
</marquee>



   $(document).ready(function()
{
$(".tracks_marquee").hover
  (
    function()
    {
       $(this).attr("scrollamount","1");
       $(this).start();  
    },
    function()
    {
       $(this).attr("scrollamount","0");
       $(this).stop();
    }
  )
})

Проверить это вживую в скрипке

http://jsfiddle.net/BM2Cq/

...