Jquery star rating how to add on mouse over and Cencel

Viewed 17

enter image description here

i try add on mouse over follow action and canel star rate when i click same rate

but its to hard to fix this,,,,

can someone help me?

$('.starRev span').click(function(){
  $(this).parent().children('span').removeClass('on');
  $(this).addClass('on').prevAll('span').addClass('on');
  return false;
});
.starR1{
    background: url('http://miuu227.godohosting.com/images/icon/ico_review.png') no-repeat -52px 0;
    background-size: auto 100%;
    width: 15px;
    height: 30px;
    float:left;
    text-indent: -9999px;
    cursor: pointer;
}
.starR2{
    background: url('http://miuu227.godohosting.com/images/icon/ico_review.png') no-repeat right 0;
    background-size: auto 100%;
    width: 15px;
    height: 30px;
    float:left;
    text-indent: -9999px;
    cursor: pointer;
}
.starR1.on{background-position:0 0;}
.starR2.on{background-position:-15px 0;}
 <span class="starR1 on">star1_left</span>
  <span class="starR2">star1_right</span>
  <span class="starR1">star2_left</span>
  <span class="starR2">star2_right</span>
  <span class="starR1">star3_left</span>
  <span class="starR2">star3_right</span>
  <span class="starR1">star4_left</span>
  <span class="starR2">star4_right</span>
  <span class="starR1">star5_left</span>
  <span class="starR2">star5_right</span>
</div>

0 Answers
Related