Jquery addRemove Class - If statement

Jquery addRemove Class - If statement

I need when I click Toggle for the jQuery to remove .hidesome and change it to .show and vise versa.

Can not get this...it's been 4 hours of searching.

  1. <a href="#" class="button">Toggle</a>
  2. <div class="signatureContain">
  3. <div class="signature hidesome">
  4.     When the button above is pressed you should see the rest<br />
  5.     "the rest"
  6. </div>
  7. </div>

  8. <a href="#" class="button">Toggle</a>
  9. <div class="signatureContain">
  10. <div class="signature hidesome">
  11.     When the button above is pressed you should see the rest<br />
  12.     "the rest"
  13. </div>
  14. </div>
  1. ('.signatureContain').live('click',function(){
  2.       if ($(this).hasClass('hidesome'))
  3.       {
  4.          $(this).removeClass('hidesome');
  5.          $(this).addClass('show');
  6.       } else
  7.       {
  8.          $(this).removeClass('show')
  9.          $(this).addClass('hidesome');
  10.       }
  11. });
  1. .hidesome{ height:20px;overflow:hidden}
  2. .show{ height:auto }