title: afterAjaxUpdate callbackfunction CListView shows undefined
body: <p>i am trying to call a function which is defined in another js file by afterAjaxUpdate paramter of the file name but i got error in console that function is not defined</p>
  
  <pre><code>&lt;?php 
  $dataProvider=new CActiveDataProvider('profiles',array('pagination'=&gt;array('pageSize'=&gt;3))); ?&gt;
  &lt;?php $this-&gt;widget('zii.widgets.CListView', array(
  'dataProvider'=&gt;$dataProvider,
  'itemView'=&gt;'_profilesview',
  'template'=&gt;'{sorter}&lt;br /&gt;{pager}{items}{pager}',
      'enableSorting' =&gt; true,
      'sortableAttributes'=&gt;array(
       'name'=&gt;'By firstName',
       'location'=&gt;'By city',
       'age'=&gt;'By age',
       'likes'=&gt;'By likes'
       ),
       'afterAjaxUpdate'=&gt;'readcookie()',
  ));
   ?&gt;
  </code></pre>
  
  <p>my js function is </p>
  
  <pre><code>$(document).ready(function(){
     function readcookie()
     {
         alert("hi");
     }
  });
  </code></pre>
  
  <p>i can see in my source that function defined in the file is included after all the js files that are included by yii default
  when i register my script in my layout it dosent find $ because jquery not included when i include jquery it gets included twice which leads to trigger my event
  i also tried to by setting </p>
  
  <blockquote>
    <p>renderPartial('Mybelowview',null,false,true)</p>
  </blockquote>
  
  <p>which leads again my js file to include multiple times and my event gots trigger multiple time.</p>
  
  <p>This is very confusing please help to get out of it
  Thanks all for being so generous</p>