title: Using JQuery to toggle between styles
body: <p>Good afternoon,</p>
  
  <p>I am searching for a way to Toggle between styles:</p>
  
  <p>Example:</p>
  
  <p>I have two styles(classes), one makes the paragraph red and the other makes the paragraph blue. I only  want to use JQuery to call the styles, not to hold the styles itself.</p>
  
  <p>So when I click a button, the paragraph turns red, when I click again, it turns blue.</p>
  
  <p>Again, I would rather have the style separate and given class names and have JQuery switch between the two.</p>
  
  <p>I have search the net but keep coming up with show/hide examples where the styles are embedded into the JQuery function.</p>
  
  <p>Any ideas will be appreciated!</p>
  
  <p>Overmars</p>
  
  <p>Hello everyone! This is what I did, as I mentioned I was simply trying to toggle between two styles. One styles does something, example: Make a text red or change an image and the other style makes another thing happened.</p>
  
  <p>Thanks every one for your time a patience. You all do make a difference.</p>
  
  <p>I found the answer in my JQuery Cook Book. Chapter 3. Event Handling Page 69. Here is the code:</p>
  
  <pre><code>$(document).ready(function() {
      $('.normalStyle').click(function(){
          $(this).toggleClass('newStyle');
      });
  });
  </code></pre>