how class works in jquery
<p>javascript</p>

<pre><code>var name_of_inchatting_class="ch"+inchatting_sub.toString();
var prev_name_of_inchatting_class="ch"+prev_inchatting_sub.toString();          
$(prev_name_of_inchatting_class).css({'background-color' : '', 'opacity' : ''}) ;                           
$(name_of_inchatting_class).css({ 'background-color' : '#D5D5D2', 'opacity' : '0.70' });
</code></pre>

<p>html code</p>

<pre><code>&lt;ul id="inchatting"&gt;
   &lt;li class="ch0"&gt;&lt;img  src="img/41403_1434825607_37944358_q.jpg"&gt;Jae Jung&lt;/li&gt;
   &lt;li class="ch1"&gt;&lt;img  src="img/48983_615523712_8495_q.jpg"&gt;Yue&lt;/li&gt;
   &lt;li class="ch2"&gt;&lt;img  src="img/41621_717814907_4472_q.jpg"&gt;David&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p><code>prev_name_of_inchatting_class</code> and <code>name_of_inchatting_class</code> returns number </p>

<p>The numbers are added to the variable and it gets converted to string and in jquery it calls the class name but it doesn't work.</p>

<p>Any thoughts</p>
