Jquery alternate click event implementation code

  • 2020-03-30 01:45:42
  • 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: