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



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