改为使用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(); });});I am having some issues with jQuery MouseOut and MouseOver.Every time I hover over the selected div, the child div that needs to show appears. however, it starts flashing.I have no idea why. I have posted the code up on JsFiddle.http://jsfiddle.net/Dn6Rq/Here is the HTML code:<div class="section-item-portal"><div class="section-text">Lorem Ipsum Dolor Sit Amet, Lorem Ipsum Dolor Sit Amet, Lorem Ipsum Dolor Sit Amet, Lorem Ipsum Dolor Sit Amet, Lorem Ipsum Dolor Sit Amet, Lorem Ipsum Dolor Sit Amet, </div></div>Here is the 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();});});I would appreciate all your help :) 解决方案 DEMOUse mouseenter and mouseleave instead.$(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 mouseover和mouseout不断闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-20 15:56