i have the following jquery code:

Code JavaScript:
$(document).ready(function(){
  $(".showhide").click(function(){
    $(".slidingDiv").slideToggle(1000);
  });
});

this has a <div class="showhide"> which has the current text 'click here to expand/contract', which expands a <div class="slidingDiv"> or collapses it, whether it is open or closed. is there a way i can ammend this code so when the .slidingDiv is hidden, the div 'showhide' says 'click here to expand' and when .slidingDiv is shown, change the div 'showhide' to say 'click here to close'?