When you visit the mentioned site, you will notice that it utilizes the jQuery library. It is a user-friendly and straightforward tool. For example, by using the code snippet below:
$("#mydiv").hide();
You can easily hide the <div>
element with the id "mydiv". Additionally, instead of hide
, you can use show
or even add animation by providing a time parameter like hide(200)
for a 200 ms animation effect.
Another useful feature to explore is the toggle
effect, which toggles between hiding and showing an element.
To further enhance your knowledge, I recommend delving into jQuery events and selectors through the official jQuery documentation.
In case you have similar queries in the future, consider conducting a quick search on Google first to save time.
Edit
The functionality described on the linked site actually relies on the HTML5 element discussed by andronikus. However, since full HTML5 support may still be lacking in some browsers, using jQuery show/hide remains a more practical approach for now.