title: checkbox selection, onchange go to function. [checkboxes are images. and not the actual checkbox]
body: <pre><code>&lt;div id="dtree_activity"&gt;
      &lt;ul&gt;&lt;li&gt;&lt;a href="#" class=""&gt;&lt;ins class="jstree-checkbox"&gt;&amp;nbsp;&lt;/ins&gt;
      &lt;ins class="jstree-icon"&gt;&amp;nbsp;&lt;/ins&gt;Fresh&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My code:-</p>
  
  <pre><code>j('#dtree_activity').click(function(){
  if(j('#dtree_activity li').is('.jstree-checked'))
  {
      doSometin();
  
  }
  else
  {
      doSometinElse();
  
  }
  
  });
  </code></pre>
  
  <p>What it does:-</p>
  
  <p>It checks if the checkbox[Image] is clicked.. Determined by the presence of class "jstree-checked"</p>
  
  <p>Problem:-</p>
  
  <p>It works but the state is updates one click late.</p>
  
  <p>Eg: i check the checkbox, it should doSomtin() ... but it wont
  if i click again anywhere in the div it will go to doSometin() </p>