phpsycho Posted July 30, 2011 Share Posted July 30, 2011 $(function() { $("#mail") .mouseover(function() { var src = $(this).attr("src").match(/[^\.]+/) + "_over.png"; $(this).attr("src", src); $(this).css("bottom", 10); $(".msg").text("Signup for Alpha Web Pro, you get your own email account with us. [username]@alphawebpro.com").fadeIn("fast"); }) .mouseout(function() { var src = $(this).attr("src").replace("_over", ""); $(this).attr("src", src); $(this).css("bottom", "5"); $(".msg").text("").fadeOut("fast"); }); $("#user") .mouseover(function() { var src = $(this).attr("src").match(/[^\.]+/) + "_over.png"; $(this).attr("src", src); $(this).css("bottom", 10); $(".msg").text("Check out the Alpha Web Pro community. There you can interact with your programming friends and post things to the forum").fadeIn("fast"); }) .mouseout(function() { var src = $(this).attr("src").replace("_over", ""); $(this).attr("src", src); $(this).css("bottom", "5"); $(".msg").text("").fadeOut("fast"); }); $("#analytics") .mouseover(function() { var src = $(this).attr("src").match(/[^\.]+/) + "_over.png"; $(this).attr("src", src); $(this).css("bottom", 10); $(".msg").text("COMING SOON! - Website analytics for any and all of your websites you wish to monitor").fadeIn("fast"); }) .mouseout(function() { var src = $(this).attr("src").replace("_over", ""); $(this).attr("src", src); $(this).css("bottom", "5"); $(".msg").text("").fadeOut("fast"); }); $("#shop") .mouseover(function() { var src = $(this).attr("src").match(/[^\.]+/) + "_over.png"; $(this).attr("src", src); $(this).css("bottom", 10); $(".msg").text("Go shopping at Alpha Web Pro.com; we have what you are looking for. Website templates, scripts, and ebooks for noobs all the way to master coder").fadeIn("fast"); }) .mouseout(function() { var src = $(this).attr("src").replace("_over", ""); $(this).attr("src", src); $(this).css("bottom", "5"); $(".msg").text("").fadeOut("fast"); }); }); when I put my mouse over an image it changes and moves up 5px then displays a msg div box with content in it. that box flashes. It shows then hides shows and hides and shows until you move the mouse away. Is that related to to having the image move up 5px? if so.. how could I fix that? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/243286-div-keeps-flashing-on-mouseover/ Share on other sites More sharing options...
nogray Posted July 30, 2011 Share Posted July 30, 2011 onmouseover and onmouseout will fire everytime the mouse enters and exsits a child node. I think jquery has an onmouseenter and onmouseleaves that solves this problem. Quote Link to comment https://forums.phpfreaks.com/topic/243286-div-keeps-flashing-on-mouseover/#findComment-1249588 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.