Text that slides when hovering the mouse

Asked

Viewed 381 times

0

I have that code marquee here:

<marquee direction="left" onmouseover="this.stop();" onmouseout="this.start();" scrollamount="2" height='18px' width='180px'>MEU TEXTO</marquee>

I would like the text to scroll ONLY when I mouse over it and stop when I take the mouse off it.

I didn’t want to use this "MARQUEE" but a jQuery to look more elegant.


I adapted but it didn’t work: http://jsfiddle.net/56pb9nwp/

He’s rolling on his own!

2 answers

1

Da to use the Jquery Marquee

Adapting only to your need.

var $mq = $('.marquee').marquee();

//Pause
$('.p').click(function(){
  $mq.marquee('pause');
});

//Resume
$('.r').click(function(){
  $mq.marquee('resume');
});

0

  • Okay, none of the other effects do what I need, could you point me to any modifications to the code I have? It would be easier because I’m a bit of a layman.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.