2011-03-29 4 views
0

내가 성급 플러그인으로 재생하고,하지만 난이 페이지처럼, 오른쪽에 가져가 레이블을 보여주기 위해 제대로 구성 할 수 없습니다 테스트-3B :jQuery를 등급 플러그인

http://www.fyneworks.com/jquery/star-rating/#tab-Testing

<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"/> 
    &nbsp; 
<input type="radio" name="rating" value="2" style="margin: 0;" class="star" title="Poor"/> 
    &nbsp; 
<input type="radio" name="rating" value="3" style="margin: 0;" class="star" title="OK"/> 
    &nbsp; 
<input type="radio" name="rating" value="4" style="margin: 0;" class="star" title="Good"/> 
    &nbsp; 
<input type="radio" name="rating" value="5" style="margin: 0;" class="star" title="Very good"/> 
<span id="hover-test" style="margin:0 0 0 20px;">Hover tips will appear in here</span><br /> 

답변

1

나는 당신의 플러그인을 시도하고 잘 작동합니다. http://jsfiddle.net/VgWtG/

당신은 스스로를 테스트 할 수

나는 여기에 소스 코드를 넣습니다. 코드에 </script> 대신 <script type='text/javascript'>을 입력하십시오. 그런 다음 입력 세트를 div으로 둘러 쌉니다.

하지만 문제는 누락 된 포함에서 비롯된 것입니다 (내가 준 소스 코드에서 확인하십시오). 감사합니다.

관련 문제