title: Java script to show and hide
body: <p>My requirement is pretty simple, it has to check for a variable and display/hide a class accordingly. It is on a sharepoint publishing page. 
  Using the following snippet is not working. </p>
  
  <pre><code>if ( source = 'show')
  {
  $('.classshide').hide();
  }
  else
  {
  $('.classsshow').hide();
  }
  </code></pre>
  
  <p>It works only when the source variable is show and it should work the otherway too, when it is not equal to show or equal to hide, please hide the classshow. </p>