jQuery Star Rating Plugin v4.11 - Activate Titles
Hi
I am using the above Star Rating system on a clients website. I have it displaying the title when the stars are hovered over, but want them activated when a user clicks on a star.
So if a user clicks on a 3rd star it shows, and KEEPS displaying, the text "Poor" and doesn't revert back to "Click to review".
What do I need to add to the following code to make the title text active:
- <script type="text/javascript">
<!--
$(function(){
$('.rad1-star').rating({
focus: function(value, link){
var tip = $('.hover_text1');
tip[0].data = tip[0].data || tip.html();
tip.html(link.title || 'value: '+value);
},
blur: function(value, link){
var tip = $('.hover_text1');
$('.hover_text1').html(tip[0].data || '');
}
});
});
//-->
</script>
<div class="InputDivs">
<span class="sitxt">Accessibility</span>
<input class="rad1-star required" type="radio" name="SICode1" value="0" title="Not Applicable"<? echo $sicode1_0_v; ?>/>
<input class="rad1-star" type="radio" name="SICode1" value="1" title="Very Poor"<? echo $sicode1_1_v; ?>/>
<input class="rad1-star" type="radio" name="SICode1" value="2" title="Poor"<? echo $sicode1_2_v; ?>/>
<input class="rad1-star" type="radio" name="SICode1" value="3" title="Satisfactory"<? echo $sicode1_3_v; ?>/>
<input class="rad1-star" type="radio" name="SICode1" value="4" title="Good"<? echo $sicode1_4_v; ?>/>
<input class="rad1-star" type="radio" name="SICode1" value="5" title="Very Good"<? echo $sicode1_5_v; ?>/>
<input class="rad1-star" type="radio" name="SICode1" value="6" title="Excellent"<? echo $sicode1_6_v; ?>/>
<span class="hover_text1 hover_text_style">Click to review</span>
</div>