Javascript 选框移动应该在鼠标悬停时停止,然后在离开时开始?

Javascript 选框移动应该在鼠标悬停时停止,然后在离开时开始? ,javascript,jquery,html,css,marquee,Javascript,Jquery,Html,Css,Marquee,嗨,ppl 我正在使用一个简单的选框来向上移动我的文本。当它在每个li标记的鼠标上方移动时,所有li都应该停止旋转,因为链接可以被查看,当我将鼠标移出时,它应该继续向上移动。您能告诉我如何继续使用JQUERY吗。 提前感谢。使用onmouseover=“this.stop();”和onmouseout=“this.start();”: code在这里 使用onmouseover=“this.stop();”和onmouseout=“this.start();”: code在这里 您可以使用s

嗨,ppl

我正在使用一个简单的选框来向上移动我的文本。当它在每个li标记的鼠标上方移动时,所有li都应该停止旋转,因为链接可以被查看,当我将鼠标移出时,它应该继续向上移动。您能告诉我如何继续使用JQUERY吗。 提前感谢。

使用
onmouseover=“this.stop();”
onmouseout=“this.start();”

code在这里
使用
onmouseover=“this.stop();”
onmouseout=“this.start();”

code在这里

您可以使用
scrollAmount=0
来执行此技巧。它将阻止标签移动

<marquee behavior="scroll" direction="left" onmouseover="this.stop();" onmouseout="this.start();">code here</marquee>


您可以使用
scrollAmount=0
来执行此技巧。它将阻止标签移动

<marquee behavior="scroll" direction="left" onmouseover="this.stop();" onmouseout="this.start();">code here</marquee>

试试这个

   <marquee onmouseover="this.scrollAmount = 0;" onmouseout="this.scrollAmount = 2" direction="up" scrollamount=2 id="whatshappening">
把鼠标放在我身上
试试这个

   <marquee onmouseover="this.scrollAmount = 0;" onmouseout="this.scrollAmount = 2" direction="up" scrollamount=2 id="whatshappening">
把鼠标放在我身上

自:v27以来,firefox中的鼠标悬停已被破坏 链接:bugzilla.mozilla.org/show_bug.cgi?id=984040 因此,大多数建议的修复方案都没有帮助。 在这里找到了答案,但它破坏了其他一切: 链接:support.mozilla.org/en-US/questions/987386 在跌跌撞撞的过程中,我拼凑出了一个在ff,ie,chrome的当前版本中有效的修复程序。 以下是JSFIDLE:

基本上,我发现当使用mozilla站点上的修复程序时,jquery调用stop/start会起作用。 我还必须修复最近忽略动态缩放的chrome bug。我很快就会把它们都放在我的博客上。您可以在这里看到修复:atlbike.org
不知道这里的链接是否有效,不记得我是否在这里发布过?HTH

自:v27以来,firefox中的鼠标悬停已被破坏
$("#myMarquee").mouseenter(function(){
  document.getElementById("myMarquee").stop();
});
$("#myMarquee").mouseleave(function(){
  document.getElementById("myMarquee").start();
});
链接:bugzilla.mozilla.org/show_bug.cgi?id=984040 因此,大多数建议的修复方案都没有帮助。 在这里找到了答案,但它破坏了其他一切: 链接:support.mozilla.org/en-US/questions/987386 在跌跌撞撞的过程中,我拼凑出了一个在ff,ie,chrome的当前版本中有效的修复程序。 以下是JSFIDLE:

基本上,我发现当使用mozilla站点上的修复程序时,jquery调用stop/start会起作用。 我还必须修复最近忽略动态缩放的chrome bug。我很快就会把它们都放在我的博客上。您可以在这里看到修复:atlbike.org 不知道这里的链接是否有效,不记得我是否在这里发布过?HTH


$("#myMarquee").mouseenter(function(){
  document.getElementById("myMarquee").stop();
});
$("#myMarquee").mouseleave(function(){
  document.getElementById("myMarquee").start();
});
var isOpera=!!window.opera | | navigator.userAgent.indexOf('OPR/')>=0; //Opera 8.0+(UA检测用于检测闪烁/v8动力Opera) var isFirefox=typeof InstallTrigger!='未定义的“;//火狐1.0+ var isSafari=Object.prototype.toString.call(window.HTMLElement.indexOf('Constructor')>0; //至少Safari 3+:“[object HTMLElementConstructor]” var isChrome=!!window.chrome&!伊索佩拉;//铬1+ var isIE=/*@cc_on@*/假| |!!document.documentMode;//至少IE6 函数MarqueStart(){ if(变色){ mrq.start(); } 否则{ mrq.setAttribute('scrollamount',0,0); } } 函数MarqueStop(){ if(变色){ mrq.stop(); } 否则{ mrq.setAttribute('scrollamount',2,0); } }

var isOpera=!!window.opera | | navigator.userAgent.indexOf('OPR/')>=0;
//Opera 8.0+(UA检测用于检测闪烁/v8动力Opera)
var isFirefox=typeof InstallTrigger!='未定义的“;//火狐1.0+
var isSafari=Object.prototype.toString.call(window.HTMLElement.indexOf('Constructor')>0;
//至少Safari 3+:“[object HTMLElementConstructor]”
var isChrome=!!window.chrome&!伊索佩拉;//铬1+
var isIE=/*@cc_on@*/假| |!!document.documentMode;//至少IE6
函数MarqueStart(){
if(变色){
mrq.start();
}
否则{
mrq.setAttribute('scrollamount',0,0);
}
}
函数MarqueStop(){
if(变色){
mrq.stop();
}
否则{
mrq.setAttribute('scrollamount',2,0);
}
}
<script type="text/javascript">
        var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
        // Opera 8.0+ (UA detection to detect Blink/v8-powered Opera)
        var isFirefox = typeof InstallTrigger !== 'undefined';   // Firefox 1.0+
        var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
        // At least Safari 3+: "[object HTMLElementConstructor]"
        var isChrome = !!window.chrome && !isOpera;   // Chrome 1+
        var isIE = /*@cc_on!@*/false || !!document.documentMode;   // At least IE6
        function MarqueStart() {

            if (isChrome) {
                mrq.start();

            }
            else {
                mrq.setAttribute('scrollamount', 0, 0);

            }
        }
        function MarqueStop() {
            if (isChrome) {
                mrq.stop();
            }
            else {
                mrq.setAttribute('scrollamount', 2, 0);
            }
        }


    </script>