JQuery .attr problem. $('#id').attr('value'); returns Undefined
<p>I had this working, and somewhere along the lines I messed something up. Since then I've made several changes trying to get the problem fixed, and now I'm just stuck. As of now I have this:</p>

<pre><code>            var calBtn = $('#calButton').attr('value');
        function disappearingTable() {
            if (calBtn = 'Turn Calendar Off') 
            {
                $('.calendarLayer').toggle();
                $('#calButton').attr('value', 'Turn Calendar On');
            }
            else if (calBtn = 'Turn Calendar On') 
            {
                $('.calendarLayer').toggle();
                $('#calButton').attr('value', 'Turn Calendar Off');
            }
        }
</code></pre>

<p>That's in script tags in the header. Then in the body I have this.</p>

<pre><code>&lt;form id="calendarForm" action="javascript:void(0);"&gt;
                &lt;input type="submit" id="calButton" value="Turn Calendar Off" onclick="disappearingTable()" /&gt;
            &lt;/form&gt;
</code></pre>

<p>I can't figure it out for the life of me. Even when I tried regular Javascript, I still get undefined. Anyone help? Thanks!</p>
