Jump to content

div keeps flashing on mouseover


phpsycho

Recommended Posts

$(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

Link to comment
https://forums.phpfreaks.com/topic/243286-div-keeps-flashing-on-mouseover/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.