http://www.myjqueryplugins.com/jquery-plugin/jratingにある星の評価をjRatingで使用してい ます
同じページに、好きなように設定できるオプションがあります。私が探しているものを除いて。
いくつかの画像に1つ、2つ、または5つ星の評価を付けるデフォルト値を設定したいと思います。どうすればそれができますか?jQueryとajaxまたはxmlを使用してサーバーからデータを取得し、見つからなかったオプションに割り当てています。私はphpについて何も知らないので、彼らの例はまったく役に立ちませんでした。どんな助けでも素晴らしいでしょう。ありがとうございました。
<script type="text/javascript">
$(document).ready(function(){
$(".exemple2").jRating({
rateMax: 5,
showRateInfo: false,
isDisabled:true,
value: 3,<----------- option like this is not available how can I can do this
length : 5 // nb of stars
});
});
</scrip>
<!-- basic exemple -->
<div class="exemple">
<!-- in this exemple, 12 is the average and 1 is the id of the line to update in DB -->
<div class="exemple2" id="12_1"></div>
<!-- in this other exemple, 8 is the average and 2 is the id of the line to update in DB -->
<div class="exemple2" id="8_2"></div>
</div>