Grow your CSS skills. Land your dream job.

jQuery fadeIn / fadeOut [Solved]

  • # May 1, 2009 at 6:51 am

    Hi,
    I’m a beginner with jQuery, here is my script :

    Code:
    $(function() {
    $(‘#box’).mouseover(function() {
    $(‘a’).fadeIn(‘fast’);
    });
    $(‘#box’).mouseout(function() {
    $(‘a’).fadeOut(‘fast’);
    });

    $(‘a’).click(function() {
    $(‘#box’).fadeOut(‘slow’);
    });
    });


    The HTML :

    Code:

    The problem is that whenever I hover over the "Delete" link, it fadeOut / fadeIn and I don’t want that. Any suggestion ?

    Here is the link to the exemple http://mismouc.free.fr/jQuery/

    # May 1, 2009 at 7:59 am

    Try it using the hover function.

    Code:
    $(function() {
    $(‘#box’).hover(function() {
    $(‘a’).fadeIn(‘fast’);
    },
    function() {
    $(‘a’).fadeOut(‘fast’);
    });

    $(‘a’).click(function() {
    $(‘#box’).fadeOut(‘slow’);
    });
    });

    # May 1, 2009 at 9:29 am

    It works perfectly !
    Thank you very much !

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".