Trying to add class to dynamic selector
<p>In a page I am working on, each of the list-items's have an attribute data-number with the value of the number that the <code>&lt;li&gt;</code> is in the list.</p>

<p>The list-item's correspond to slides and I am trying to apply the class <code>.current</code> to the list-items that corresponds to the slide that is currently being viewed.</p>

<p>The slide that is currently being viewed can be get by the function <code>.getIndex()</code> and then I have to style the li with that data-attribute of that number with the class current.</p>

<p>I tried to do that with the following, but it is not working:</p>

<pre><code>$('li[data-number="'+k.getIndex();+'"]').addClass('current');
</code></pre>

<p>Any idea what I am doing wrong or how I can achieve what I am trying to?</p>
