JQuery fadein/fadeout help

Discussion in 'Programming' started by Javver, Sep 14, 2010.

  1. #1
    I know nothing about JQuery fadein/fadeout. please give me code to have like this.
    when link is clicked the description below will hide & show w/ fading effect

    ex.
    [​IMG]

    [​IMG]

    Thank you
     
    Javver, Sep 14, 2010 IP
  2. osmasters

    osmasters Well-Known Member

    Messages:
    453
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    100
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    osmasters, Sep 14, 2010 IP
  3. Javver

    Javver Active Member

    Messages:
    72
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    hellow osmasters, thank you for the reply but looks like this is more advanced
     
    Javver, Sep 14, 2010 IP
  4. omarabid

    omarabid Well-Known Member

    Messages:
    1,509
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    130
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    First, you need the link to get recognized by jQuery. So add an ID to the link.

    <a href="#about" id="a-about">About</a>
    HTML:
    In JavaScript, add the following code

    $(document).ready(function() {
    $('#a-about').toggle(function() {
    $(this).fadein();
    }, function() {
    $(this).fadeout();
    }
    });
    HTML:
    Hope it helps!
     
    omarabid, Sep 14, 2010 IP