so i'm trying alter jquery bar rating system plugin. here example of plugin: http://antenna.io/demo/jquery-bar-rating/examples/ . mine example d. plugin based on user input. want plugin work reading predetermined rating , setting point , not allowing users change rating. product rating being transformed xsl html there number rating listed on page. want take number, hide actual number, , display instead using rating bar system. i'm not expecting me don't know start in terms of altering plugin. first plugin have ever customized extent. advice, tips, or ideas on how approach tremendously appreciated. let me know if have anymore questions.
this html generated xsl containing score:
<div class="ratingsystem"> <div class="classifications"> <div class="oneclass"> <ul> <li class="product_rating_score_values_overall"> <i class="fa fa-trophy"><!--comment--></i> <span class="scoretitle scoreoverall"> overall score: </span> <span class="score">1</span> </li> </ul> </div> </div> </div>
your initialization on element this:
<select id="productrating"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> after markup initialize this(after plugin's js reference)
$(function(){ $('#productrating').barrating( initialrating: //wherever value coming from, readonly: true ); });
Comments
Post a Comment