HIDE AND SHOW CONTENT WITH JQUERY

You can add special effects to your web page with jQuery, the simplest being hide() and show(), both of which will do as advertised, but with an optional duration parameter that produces a transition effect to dynamically make the content disappear and reappear in the browser. These effects, along with animate(), fade(), and slide(), taunch when the user triggers an event such as a button click, mouse hover, or a keypress.

So, to tie the display of one element to the event of another, you will need to first customize the browser event on the first event selector, as described in the preceding section, and then in the event handler function call the effect method on a target selector, or what you want to manipulate. ...

Get HTML5: Your visual blueprint™ for designing rich web pages and applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.