title: Replace Font Class
body: <p>I want to replace font class in the whole document.<br>
  When <code>first-font-btn</code> class click, I want to change  class <code>Second-font</code> to <code>first-font</code> in this document.<br>
  When <code>second-font-btn</code> class click, I want to change class <code>first-font</code> to <code>second-font</code> in this document.<br>
  I have <code>changeFont()</code> method. How to do this problem using pure JavaScript without jQuery? Please Suggest!
  <br><br><br>
   <strong>HTML</strong></p>
  
  <pre><code>&lt;div class="languagefont"&gt;
      &lt;span class="first-font-btn"&gt;
              &lt;a onclick="changeFont(2)" href="javascript:"&gt;
                  &lt;span class="Second-font"&gt;1&lt;/span&gt;
              &lt;/a&gt;
      &lt;/span&gt;
      &lt;span class="second-font-btn"&gt;
          &lt;a onclick="changeFont(1)" href="javascript:"&gt;
              &lt;span class="Second-font"&gt;2&lt;/span&gt;
          &lt;/a&gt;
      &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var currentFont = 1;
  
      function changeFont( value ) {
          if (value != currentFont) _switch_font( value );
          currentFont = value;
      }
  &lt;/script&gt;
  </code></pre>