Lorenzo Stanco edited this page Jun 25, 2015 · 3 revisions
Clone this wiki locally

For an usage example see HowTo or a complete Demo.


  • Options
  • Events

Syntax and options:

   var myRating = new MooStarRating(options);
  • options (object): Initial options for the class.
    • form: Target form name, ID or element.
    • radios: Target radio input boxes name (default "rating")
    • half: TRUE if each star is used for two input values (dafult FALSE).
    • decheck: if TRUE clicking the same rating again will reset the control (dafult FALSE).
    • disabled: TRUE if user cannot set rate value (default FALSE, or TRUE if input radio boxes has got the disabled attribute).
    • linksClass: Links class name, for custom styling (default "star").
    • imageFolder: Image folder path, relative or absolute (default "").
    • imageEmpty: Empty star image name (default "star_empty.png").
    • imageFull: Empty star image name (default "star_full.png").
    • imageHover: Empty star image name (default as imageFull).
    • width: Links width (default 16).
    • height: Links height (default 16).
    • tip: Tip text, you can use [VALUE] and [COUNT] as placeholders (default none).
    • tipTarget: ID or element that will contain the tip (default none, the tip will be set as link title).
    • tipTargetType: tip text type, "text" or "html" (default "text").


  • click(value): Fires when a star is clicked and value is set as radios input value.
  • mouseenter(value): Stars rollover. Value under mouse position is given.
  • mouseleave(): Stars rollout.


  • setValue(value): Manually set the rating value.
  • getValue(): Get the rating value.
  • enable(): Enables rating.
  • disable(): Disables rating.
  • refresh(): Force stars redrawing.