title: jQuery change div
body: <p>I have two div's and I doing this div's change</p>
  
  <pre><code>div class="switchLeft
  
  div class="switchRight" 
  
  &lt;tab&gt; 
  (function ($) {  
  
      $(".switchLeft").click(function () {
          $(this).toggleClass("switchLeft switchRight"); 
      });
  
  })(jQuery);
  &lt;/tab&gt; 
  </code></pre>
  
  <p>and I have other two div's
  I changed the div above, I would like to see that change this div</p>
  
  <p>I have done this but not working:</p>
  
  <pre><code>$(".switchLeft").click(function (){
  { $(this).toggleClass("switchLeft switchRight"); });
  var myClass = $(this).attr("class");
  
  if (myClass == "switchLeft") {
      $('.advertTabMenu').hide();
      $('.searchTabMenu').show();
  }
  else {
      $('.searchTabMenu').hide();
      $('.advertTabMenu').show();
  }
  
  };
  </code></pre>
  
  <p>I can not add code to the site. </p>