Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.stars_small').raty({
- readOnly : true,
- half : true,
- score : 2,
- space : false
- });
- <div class="stars_small"></div>
- $('.stars_small').each(function() {
- $(this).raty({
- readOnly : true,
- half : true,
- score : 2,
- space : false
- });
- });
- // lines of JS generated with a loop in PHP (for the rate content)
- var rates = [];
- rates.push({...one rate coming from PHP...});
- rates.push({...one rate coming from PHP...});
- // etc...
- $(document).ready(function() {
- $(".starts_small").each(function(index, element) {
- $(this).raty(rates[index]);
- });
- });
Add Comment
Please, Sign In to add comment