Not Getting Star Image In Cstarrating Extension

Hey guys

I am currenly working on a project, in which I need to include CStarRating.

But When I am using it as follow :

<?php

				[left]&#036;this-&gt;widget('CStarRating',array(


						  'model'=&gt;&#036;model,


						  'attribute'=&gt;'rating',


						  'minRating'=&gt;1,


						  'maxRating'=&gt;5,


						  'starCount'=&gt;5,


						  'readOnly'=&gt;false,


						));


				 ?&gt;[/left]

I am getting the radio button in the form, but I am unable to show the stars, I can only see the radio buttons, In console I am getting no error

Please help me, how can I come out of this bug ???

Hello. i had the same problem before.

  • test it using the basic example



            $this->widget('CStarRating',array(

                'name'=>'rating_1 ,

                'value'=> 4,

                'readOnly'=>true,

            ));


            $this->widget('CStarRating',array(

                'name'=>'rating_2 ,

                'value'=> 4,

            ));




  • make sure that the name/id is unique on the page.

  • if you get the page using ajax, you have run some js code, after load like




  'afterAjaxUpdate'=>'function(id,data) {

        $.fn.rating.options.readOnly = true;

        $("span[id^=\'rating\'] > input").rating();

        }',