An example of using the alternate click event toggle method in jquery

  • 2020-03-30 00:47:24
  • OfStack

 
$('#clickId ' ).toggle( 

function(){$('#divId').hide();}, 

function(){$('#divId').show();} 

); 

The toggle method takes two arguments, one for the event to be executed alternately. If you do not pass the default is to show hidden function

Related articles: