Hide and Show Containers Using hide and show function in script.

We can hide and show specific Containers in a page by using Script by giving the click function to the buttons.

Firstly create the buttons you want to give the functionality to using HTML and Style it.

To give the functionality of click action to the button use onclick function and also create the events for the click action.

events:
  {
      'click #button_ID' : 'function_name',
  },
function_name: function (e) {
       $('#container_ID_to_show').show();
       $('#container_ID_to_hide').hide();
  },

Leave a comment

Your email address will not be published. Required fields are marked *