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. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access