title: Yii - jQuery not working after renderPartial
body: <p>I know this question has been asked numerous number of times, both here and in the Yii site, but I am not getting the solution even after going through each solution. I am sure I am doing something fundamentally wrong. So if you are still reading this - here goes nothing,</p>
  
  <p>I have a page that has a CheckBoxList widget being loaded. It has a change() jQuery function call which refreshes a CGridView which works perfectly well. I also have a span related to each of the items in the checkBoxList which have a click event.</p>
  
  <p>This click event, in turn calls a controller which "partially renders" a view - </p>
  
  <pre><code>Yii::app()-&gt;clientscript-&gt;scriptMap['jquery.js'] = false;
  
  
  $this-&gt;widget('ext.xxx.EModelWidget', array(
  'name' =&gt; $widget_name,
  'manufacturer_id' =&gt; $manufacturer_id,
      )
  );
  </code></pre>
  
  <p>And the corresponding widget code prints a CheckBoxList after fetching $data from the db.</p>
  
  <pre><code>echo CHtml::checkBoxList($this-&gt;name, array(), $data, array(
          'class' =&gt; 'modelFilter',
          'separator' =&gt; '',
          'template' =&gt; '&lt;div&gt;{input} {label}&lt;/div&gt;',
          'id' =&gt; 'dummyID',
      ));
  </code></pre>
  
  <p>As you can see, I have put the class name for each element that will be rendered as a checkbox to be <strong>modelFilter</strong></p>
  
  <p>Now I have a script in the main view file to just display an alert box when the checkBox of class modelFilter is clicked.</p>
  
  <pre><code>Yii::app()-&gt;clientScript-&gt;registerScript('model-selected', "
  $('input.modelFilter').change(function(){
    alert('Hellpo!');
    });
  ");
  </code></pre>
  
  <p>But unfortunately, this never happens.</p>
  
  <p>The two common solutions which I have read in all the forums is </p>
  
  <p>a) <strong>Yii::app()->clientscript->scriptMap['jquery.js'] = false;</strong> which you can see that I have duly followed.</p>
  
  <p>b) <strong>$result and $processOutput parameters of the renderPartial to be false and true respectively.</strong>, which is also something that I have followed.</p>
  
  <p>So my question is what should I do to just get the change function on a content that is loaded via Ajax working, in Yii!!</p>