The sliding effect can be seen in many places across the Web, most often with image galleries where images slide in and out of view. In addition, with the recent flux of real-time conversation brought on by Facebook and Twitter, sliding in and out of recent activity on a page is more common too. Twitter has integrated a sliding-in effect for its home page when new tweets are posted. As each new tweet is posted, the tweet slides down from the top, pushing the tweets currently on the page down, one by one, until the tweet makes its way off the page and out of visibility. The slideDown and slideUp methods are set up in exactly the same manner as are the show and hide methods. By adding the method to the selector, you can pass in two optional parameters (duration and callback). The names of the methods often can be confusing to jQuery newbies. These slideDown method makes elements visible and the slideUp method makes elements hidden.
$('.message').slideDown();
0 comments:
Post a Comment