Not sure why this does not work : <pre><code>&lt;div class="button button1" onclick="toggleClass();"&gt;Stay Updated&lt;/div&gt;

    &lt;script&gt;
        function toggleClass(){
            if(className == "button button1"){
                    className = "info";
          } else {
                    className = "button button 1";
}

    &lt;/script&gt;
</code></pre>

<p>Trying to change the class of the div on clicking the div.  The div is meant to act like a button which should be replaced by another div class.  This is my coding so far, please help.  Thanks in advance.</p>
