The hide() function is an inbuilt function which is used to hide the current element. Essentially display: none is used for this style.
This function requires p5.dom library. So add the following line in the head section of the index.html file.
Parameters: This function does not accepts any parameters.
Below examples illustrate the hide() function in p5.js:
Example 1: This example uses hide() function to hide the div element.
Example 2: This example uses hide() and show() function to display the div element.
- How to hide scroll bar for inactivity?
- Define ng-if, ng-show and ng-hide
- AngularJS | ng-hide Directive
- jQuery | hide() with Examples
- How to hide div element after few seconds in jQuery ?
- How to hide elements in responsive layout using CSS ?
- How to hide a div when the user clicks outside of it using jQuery?
- How to hide an element when printing a web page using CSS?
- How to Show and Hide div elements using Checkboxes ?
- How to hide the bullets on list for the sidebar?
- How to Show and Hide div elements using radio buttons?
- How to hide element on small devices in Twitter Bootstrap ?
- Image Replacement in Bootstrap using text-hide Class
- How to display icon next to show/hide text on button?
- How to Hide an HTML Element in Mobile View using jQuery ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.