Documentation

Show

From jQuery JavaScript Library

Jump to: navigation, search

.show() function - DOM manipulation

This function shows the matching elements on the page when they are hidden. It actually changes the display style to 'block'. This can cause some problems in your page's layout because it inserts a line break before and after the element, but for general use it is perfect. For a more flexible use please take a look and the .addClass()[1] and .removeClass()[2] function. You can also set a speed for the appearance to 'fast', 'normal' or 'slow' and a callback function being executed after the affect is allowed.

Example

 $("#class_div").show();


Before

 
  <div id='class_div' style="display:none">Hello world</div>
  <div id='class_div_2'>Hello world</div>
  


After:

 
  <div id='class_div' style="display:block">Hello world</div>
  <div id='class_div_2'>Hello world</div>
  



Links



Thales Jacobi 21:06, 10 July 2008 (PDT)

Retrieved from "http://docs.jquery.com/Show"