Jquery Star Rating
Jquery Star Rating
Hi!
I am trying to use Jquery Star rating plugin, but it seems hover label function is not working for me. Anyone have an idea why not?
- <script>
- $(function(){
- $('.star').rating({
- focus: function(value, link){
- // 'this' is the hidden form element holding the current value
- // 'value' is the value selected
- // 'element' points to the link element that received the click.
- var tip = $('#hover-test');
- tip[0].data = tip[0].data || tip.html();
- tip.html(link.title || 'value: '+value);
- },
- blur: function(value, link){
- var tip = $('#hover-test');
- $('#hover-test').html(tip[0].data || '');
- }
- });
- });
- </script>
- <input type="radio" name="rating" value="1" style="margin: 0;" class="star" title="Very poor"/>
-
- <input type="radio" name="rating" value="2" style="margin: 0;" class="star" title="Very poor"/>
-
- <input type="radio" name="rating" value="3" style="margin: 0;" class="star"/>
-
- <input type="radio" name="rating" value="4" style="margin: 0;" class="star"/>
-
- <input type="radio" name="rating" value="5" style="margin: 0;" class="star"/>
- <span id="hover-test" style="margin:0 0 0 20px;">Hover tips will appear in here</span> </span><br />