Options

new Starbox(
element, // the id of your element
average, // average rating to start with
{
buttons: 5, // the number of buttons (choices)
className : 'default', // or your own classname
color: false, // color of the colorbar
duration: 0.6, // duration of the effect across the bar, if used
effect: { mouseover: false, mouseout: true } // or your own
hoverClass: 'hover', // or your own classname
hoverColor: false, // color of the colorbar when hovered
ghostColor: false, // color of the ghostbar
ghosting: false, // shows a ghost bar with the average when true
identity: false, // can be used with onRate
indicator: false, // or a string to add an indicator div after the starbox
// #{average}, #{max} and #{total} can be used
// example: '#{average}/#{max} out of #{total} votes'
inverse: false, // true, false
locked: false, // or true to load an disabled starbox
max: 5, // maximum rating, that of the last star
onRate: false, // or function(element, info){}
// info = { identity: identity,
// rated: rated,
// average: average,
// max: max,
// total: total
// }
overlay: 'default.png', // or other png in same folder as starbox.css
rated: false, // or the previous rating cast by this user,
// this is used by rerate to see if the starbox
// needs to be locked
ratedClass: 'rated', // or your own
rerate: false, // or true to allows adjusting of previous rating
stars: 5, // the amount of stars
total : 0 // the amount of votes cast
}
);

Year

Month

Day

About the author

Joon Kyoung(a.k.a Firejune) is a web front-end development journeyman,
and passionate about JavaScript. Sometimes he is a buster in interface design.
Making a better web place is his ongoing mission and he is currently working with the best engineers of the industry at RSUPPORT.
He loves coffee, cola and kimchi(what a fantastic combination?!). You can find him on Twitter @firejune or Blog.