Add CSS class to div
<p>I wrote this script  but it only works if I don't ad <code>class="yes"</code>, but if iI add it, it won't work, what's the reason for this. Thank you.<br><br>
This works:</p>

<pre><code>&lt;script type="text/javascript"&gt;  

    var d=new Date();
    var weekday=new Array(7);
    weekday[0]="&lt;div&gt;Sunday&lt;/div&gt;";
    weekday[1]="&lt;div&gt;Monday&lt;/div&gt;";
    weekday[2]="&lt;div&gt;Tuesday&lt;/div&gt;";
    weekday[3]="&lt;div&gt;Wednesday&lt;/div&gt;";
    weekday[4]="&lt;div&gt;Thursday&lt;/div&gt;";
    weekday[5]="&lt;div&gt;Friday&lt;/div&gt;";
    weekday[6]="&lt;div&gt;Saturday&lt;/div&gt;";

    document.write("Today is " + weekday[d.getDay()]);

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

<p>This doesn't work</p>

<pre><code>&lt;script type="text/javascript"&gt;

    var d=new Date();
    var weekday=new Array(7);
    weekday[0]="&lt;div class="yes"&gt;Sunday&lt;/div&gt;";
    weekday[1]="&lt;div class="yes"&gt;Monday&lt;/div&gt;";
    weekday[2]="&lt;div class="yes"&gt;Tuesday&lt;/div&gt;";
    weekday[3]="&lt;div class="yes"&gt;Wednesday&lt;/div&gt;";
    weekday[4]="&lt;div class="yes"&gt;Thursday&lt;/div&gt;";
    weekday[5]="&lt;div class="yes"&gt;Friday&lt;/div&gt;";
    weekday[6]="&lt;div class="yes"&gt;Saturday&lt;/div&gt;";

    document.write("Today is " + weekday[d.getDay()]);

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