我是一個PHP新手/ JAVA的總新手,但並非沒有,我得到了jQuery星級插件在我的網站上工作,並顯示文字旁邊的星星,當我徘徊它。jQuery星級評分 - 懸停多行
現在我想添加另一排星星,但我只想讓文字顯示我正在盤旋的那一行。
例 ROW 1星 - 懸停文本 ROW 2星 - 懸停文本
當我懸停行1或2,文本將在兩行顯示。任何想法如何我可以解決這個問題。在我的頭
Java代碼
<script>
jQuery(function($) {
$('.wesley').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, #hover-test2');
tip[0].data = tip[0].data || tip.html();
tip.html(link.title || 'value: ' + value);
},
blur: function(value, link) {
var tip = $('#hover-test');
$('#hover-test, #hover-test2').html(tip[0].data || '');
}
});
});
</script>
什麼顯示的文字和旁邊的星星
<span id="hover-test2" style="margin:0 0 0 20px;">Hover tips will appear in here</span>
java不是JavaScript。 – 2012-03-03 16:54:26
發佈包含星星等行的完整HTML源代碼......看起來像你正在創建一個甚至可以聽任何一行。您將需要創建兩個獨立的偵聽器,每個獨立偵聽器對應一行。 – 2012-03-03 16:57:53
Appologies,我以爲他們是一樣的:( – 2012-03-03 16:58:23