jQuery - Hide and Show -

Discussion in 'jQuery' started by PhpRay, Jul 29, 2009.

  1. #1
    Hi to all!!

    I'm new about jQuery and I cannot find the right way to .hide a div and then .show it with the same button at the second click...

    And also the text of the button has to change from "Click to hide" to become "Click to show".. How can I make it??

    I really need it... any tip please?


    Thx so much guys!!
     
    Last edited: Jul 29, 2009
    PhpRay, Jul 29, 2009 IP
  2. Martinoes

    Martinoes Peon

    Messages:
    110
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Martinoes, Jul 29, 2009 IP
  3. PhpRay

    PhpRay Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I thank you so much !! I thought I needed an IF() condition or something like that... this means that I have to study jQuery deeper now!! ;)

    And how can I change the text of the button when the image is colsed?


    BTW: I see that this kind of effect is different from a similar effect with Javascript... I am not sure but the Javascript effect seems to be more professional when it hides or shows an element... isn't it??

    Thx again!!
     
    Last edited: Jul 29, 2009
    PhpRay, Jul 29, 2009 IP