Star rating , change star on mouse over
<pre><code>function change_star_image(star_id){
 $("#star_rating_image_"+star_id).css('background', 'url(images/full-star.png)');
 $("#star_rating_image_"+star_id).mouseout(function(){
    $("#star_rating_image_"+star_id).css('background', 'url(images/empty-star.png)');
 });
 var endval = star_id;

for (var i=1;i&lt;=endval;i++){
     $("#star_rating_image_"+i).css('background', 'url(images/full-star.png)');
} 
}
</code></pre>

<p>am working on on the questionnaire form,</p>

<p>i have 5 question, ans type is star rating...</p>

<p>The above snippet working fine , when i am going to left to right,</p>

<p>Assume for example . i release the mouse cursor in the 4 star,</p>

<p>if i come again to and if start from 2star means , the 3rd star not going to disable mode, so as per my code, it display like</p>

<p>example when i start rating..</p>

<pre><code>1=bright star
2=bright star
3=bright star
4=nobright star
5=nobright star
</code></pre>

<p>if i again start rating from 2nd star, then rating star look like</p>

<pre><code>1=bright star
2=no bright star
3=bright star ======&gt; it should go nobright star automatically , when i go the 2nd star..
4=nobright star
5=nobright star
</code></pre>
