Jquery: why my 'find()' method not updating?
<p>i have a function to find the length of finding class,  but it not working always return the length is '0';</p>

<p>some thing is wrong with my code: can any one advice me the proper way. but i need to use the same structure of the code style to achieve this.</p>

<p>look on to my code :</p>

<pre><code>&lt;div id='list'&gt;
  &lt;ul&gt;
        &lt;li&gt;1&lt;/li&gt;
        &lt;li&gt;2&lt;/li&gt;
        &lt;li&gt;3&lt;/li&gt;
        &lt;li&gt;4&lt;/li&gt;
        &lt;li&gt;5&lt;/li&gt;      
  &lt;/ul&gt;
    &lt;p&gt;&lt;/p&gt;
&lt;/div&gt;​

function callMe(params){
    $(params.list).click(function(){
       $(this).addClass('c_on');
        var length = $(params.list).find('.c_on').length;
        $('p').text(length)// return always 0, even i clicked no.of list.        
    })
}

$(document).ready(function(){
    var obj = {
        list : $('ul').find('li')      
    }
   callMe(obj);
})

style :

li.c_on{
border:1px solid green;
}
</code></pre>

<p>​
​Here is the fiddle : <a href="http://jsfiddle.net/AeGvf/1/" rel="nofollow">http://jsfiddle.net/AeGvf/1/</a></p>
