Dear all,
I am using Cstar rating and using jQuery.JSON instead of ajax. (from this post http://www.yiiframework.com/forum/index.php/topic/29851-complete-guide-for-multiple-cstarratings-on-same-page/).
Here is my functions. each time I use it in my view.php, All jquery plugin in my page will disappear and disabled.
Also, the CstarRating will change to radio buttons instead of stars.
I guess there are some conflicts… any ideas?
$this->widget('CStarRating',array(
'name'=>'rating'.$model->rating_id, // an unique name
'starCount'=>5,
'readOnly'=>false,
'resetText'=>'',
'value'=>$value,
'callback'=>'
function(){
url = Yii::app()->request->requestUri."/rating";
$jQuery.getJSON(url, {id: '.$model->rating_id.', val: $(this).val()}, function(model) {
if (model.status == "success")
{
$("#rating_success_'.$model->rating_id.'").html(model.div);
$("#rating_success_'.$model->rating_id.'").fadeIn("slow");
var pause = setTimeout("$(\"#rating_success_'.$model->rating_id.'\").fadeOut(\"slow\")",5000);
$("#rating_info_'.$model->rating_id.'").html(model.info);
$("input[id*='.$model->rating_id.'_]").rating("readOnly",true);
}
});
}'
));
Best