Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery fadeIn / fadeOut [Solved]

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24751
    Rémi
    Member

    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/

    #56999
    apostrophe
    Participant

    Try it using the hover function.

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

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

    #57002
    Rémi
    Member

    It works perfectly !
    Thank you very much !

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.