bug with Pagination (AJAX)

Hi,

I think there is a bug with AJAX Pagination

so look at example everything is working at first page but after i goto second page

draggable ist not working . but not only draggable everythink with used javascript

if i used pagination without ajax it works.




 $dataProvider=new CActiveDataProvider('model',

                array('pagination'=>array(

		'pageSize'=>'3'),

                  'criteria'=>$criteria));


   $this->renderPartial('index',array('dataProvider'=>$dataProvider),false,true);







<?php $this->widget('zii.widgets.CListView', array(

    'dataProvider'=>$dataProvider,

    'itemView'=>'_view', 

    'ajaxUpdate' => 'update'

)); ?>



_view




text text 


         <?php $this->beginwidget('zii.widgets.jui.CJuiDraggable', array(

		'id' => $data->id,

		'options' => array(

                'scope' => 'drag',

		'revert' => true,

                'opacity' => 0.30,

		)

		));?>


	<?php //echo CHtml::encode($data->getAttributeLabel('image')); ?</b> ?>

	<?php //echo CHtml::image('images/'.$data->image); ?>

        <img src="images/<?php echo $data->image;?>" width="80px" height="100px"/>

	

        <?php $this->endwidget(); ?>

        




but check output with firebug

first page

jQuery(’#1’).draggable({‘scope’:‘drag’,‘revert’:true,‘opacity’:0.3});

second page

jQuery(’#2’).draggable({‘scope’:‘drag’,‘revert’:true,‘opacity’:0.3});

so should work ?

javascript shouldn’t work in this case.

you must use jquery’s live function

http://api.jquery.com/live/

also i found a function


afterAjaxUpdate

http://www.yiiframework.com/doc/api/CListView#afterAjaxUpdate