Jquery alternate click event implementation code



$('#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