Jump to content

  • Free consultations and support
  • Live chatClick Here for Live Chat
  • Call ico 1888-906-1888
    Phone support: Open

    Ready for your call :)

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams

    Phone support: Closed

    We are back in: 1h 20m

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams


Hide and Show jQuery methods

hide jquery methods show

  • Please log in to reply
 

#1 DesGuru

DesGuru

    Senior Member

  • Designer
  • 220 posts

Posted 31 October 2012 - 07:45 PM

Using jQuery, you can show or hide HTML elements by using the show() and hide() methods:
Syntax for hide() and show():
$(selector).hide(speed,callback);

$(selector).show(speed,callback);
The parameter speed is optional and it specifies a specific speed hiding or showing. Speed can have the values “slow”,"fast", or it can be milliseconds.
The parameter callback is also optional and it is the name of a specific function that you want to execute after hide or show completes.
Example
$("#hide").click(function(){
$("p").hide(5000);
});

Example of using the show() method

$("#show this").click(function(){
$("p").show(5000);
});




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users