Hide and Show Div With JavaScript/jQuery

In this tutorial I have created sample function to display and hide div.Normally if we don’t want jquery include in our project then we need to create functionality with help of core javascript technology, with help of jquery it’s very easy and quick.

Option1: Using jQuery

Step1 : Include jquery library file.

Step2: We ned to call jquery hide() and show() method to hide and show div element.

Option 2: Using javascript

Below method are based on core javascript to hide and show div.

First we will create hideDiv() and showDiv() method for hide and show div.

Now we will call above method in our file.