guess i would do like this.
didn't tested it.

if(!$("div").hasClass("over"))
{
    $("div").hover(
    function()
    {
         $(this).addClass("over");
         $(this).fadeIn()
    },
    function()
    {
         $(this).fadeOut(function()
         {
               $(this).removeClass("over");
         });
    });
}

or with numbers:

var i=0;
if(i==0)
{
    $("div").hover(
    function()
    {
         i=1;
         $(this).fadeIn()
    },
    function()
    {
         $(this).fadeOut(function()
         {
                i=0;
          });
    });
}
On 13 Mai, 08:17, runrunforest <craigco...@gmail.com> wrote:
> Hi,
>
> I have a button hidden initially, when mouse hovers the parent element
> of the button, button will fadeIn, and when mouse out, the button will
> fadeOut ( disappear).
>
> the problem is when, you hover multiple time in a quick pace (6 hover
> ins outs in 1 second), the button will disappear forever. No what I
> want.
>
> Please have a look at it here:
>
> http://www.badede.com/op.html

Reply via email to