現在、Wordpress ブログに次の星評価プラグインを追加しようとしています: FYNEWORKS
しかし、何らかの理由で私はうまくいかないようです。私はjQueryにまったく慣れていないので、助けていただければ幸いです。
HEADER に追加:
<script type="text/javascript" src="/wp-content/themes/wordpress-naked/js/jquery.js"/>
<script type="text/javascript" src="/wp-content/themes/wordpress-naked/js/jquery.rating.js"/>
<script type="text/javascript" src="/wp-content/themes/wordpress-naked/js/jquery.form.js"/>
<script type="text/javascript" src="/wp-content/themes/wordpress-naked/js/jquery.MetaData.js"/>
<script type="text/javascript" src="/wp-content/themes/wordpress-naked/js/jquery.rating.pack.js"/>
また、ヘッダーにも:
<script type="text/javascript">
jQuery(function($){
('.hover-star').rating({
focus: function(value, link){
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>
私のCSSファイル:
/* jQuery.Rating Plugin CSS - http://www.fyneworks.com/jquery/star-rating/ */
div.rating-cancel,div.star-rating{float:left;width:17px;height:15px;text-indent:-999em;cursor:pointer;display:block;background:transparent;overflow:hidden;}
div.rating-cancel,div.rating-cancel a{background:url("/wp-content/themes/wordpress-naked/js/delete.gif") no-repeat 0 -16px; !important}
div.star,div.star a{background:url("/wp-content/themes/wordpress-naked/js/star.gif") no-repeat 0 0px; !important}
div.rating-cancel a,div.star-rating a{display:block;width:16px;height:100%;background-position:0 0px;border:0 !important;}
div.star-rating-on a{background-position:0 -16px!important;}
div.star-rating-hover a{background-position:0 -32px;}
/* Read Only CSS */
div.star-rating-readonly a{cursor:default !important;}
/* Partial Star CSS */
div.star-rating{background:transparent!important;overflow:hidden!important;}
/* END jQuery.Rating Plugin CSS */
私のラジオ ボタンには、2 番目のコード部分「.hover-star.
ただし、まだ機能していません。私はタイプミスをしましたか、それとも何かを見落としていますか?
サンクス:)