jQuery   发布时间:2022-04-19  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Jquery鼠标悬停和mouseout一直闪烁大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我在使用jQuery MouSEOut和MouSEOver时遇到了一些问题.

每次我将鼠标悬停在选定的div上时,都会显示需要显示的子div.然而,它开始闪烁.

我不知道为什么.我已经在Jsfiddle上发布了代码.

http://jsfiddle.net/Dn6Rq/

这是HTML代码

<div class="section-item-portal">
<div class="section-text">Lorem Ipsum Dolor Sit Amet,Lorem Ipsum Dolor Sit Amet,</div>
</div>

这是jQuery:

$(document).ready(function () {

$('.section-text').hide();

$('.section-item-portal').mouSEOver(function () {
    $(this).children('.section-text').fadeIn();
});

$('.section-item-portal').mouSEOut(function () {
    $(this).children('.section-text').fadeOut();
});

});

我很感激你的帮助:)

解决方法

DEMO

请改用mouseenter和mouSELEave.

$(document).ready(function () {

    $('.section-text').hide();

    $('.section-item-portal').mouseenter(function () {
        $(this).children('.section-text').fadeIn();
    });

    $('.section-item-portal').mouSELEave(function () {
        $(this).children('.section-text').fadeOut();
    });

});

大佬总结

以上是大佬教程为你收集整理的Jquery鼠标悬停和mouseout一直闪烁全部内容,希望文章能够帮你解决Jquery鼠标悬停和mouseout一直闪烁所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。