• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • Tutorials
    • API Docs
  • Community
    • Gallery
    • Blog »
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • YUI 2
    • YUI Compressor
    • YUI Doc »
    • YUI Builder
    • YUI PHP Loader
    • YUI Test
    • YUI Website
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • FAQ
  • Developer FAQ
  • Developer Guide
  • Module Setup

Tag Cloud

io lsmith yql table nzakas caridy jafl plugin model event css animation davglass satyam ericf apipkin widget solmsted foxxtrot liferay greghinch async form datatable node

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Ratings (gallery-ratings) on cdn

    Last Updated: 10/20/11
    + 1 -

    Peter Peterson

    YUI Contributor

    See 1 more by this user.

    Created: 04/8/10
    Last CDN Push: 10/20/11
    Build Tag: gallery-2011.10.20-23-28
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.4.1
    Free for use.

    A multi-star rating widget. By default, it will display 5 stars, but can be configured to display any number. If the initial value is a fraction, it will display this.
    Clicking on a star will fire a ratingClick event which contains the chosen rating. Optionally, the application could listen to the ratingChange event. In addition to updating the widget, the srcNode provided will be updated with the selected rating.
    Widget can be configured to be displayed inline or as a block. With or without a "Clear Rating" button, and the tooltips for the widget may also be configured. Two skins are also available for use "default" and "small", but a good F2E could also make their own custom skin if desired.

    • Tags:
    • linuxpete
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Add a target node with a rating:

    <span id="myWidget">2.5</span>

    or

    <input type="text" name="myRatings" id="myRatings" value="3.7">

    Code Sample

    <script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2011.10.20-23-28'
    }).use('gallery-ratings', function(Y) {
     
         var ratings = new Y.Ratings({ srcNode: "#myWidget" }, inline: true, skin: "small" });
         var ratings = new Y.Ratings({ srcNode: "#myRatings" }, inline: true, skin: "small" });
     
    });

    Forum Posts

    Subject Author Date
    Progressive enhancement Matt Parker 04/14/10
    Re: Progressive enhancement Peter Peterson 04/15/10
    Re: Progressive enhancement Marc 05/4/10
    Re: Progressive enhancement Daniel 10/17/11
    Re: Progressive enhancement Daniel 10/17/11
    Post data of stars rating Daniel 10/18/11
    Re: Post data of stars rating Daniel 10/19/11
    Re: Post data of stars rating Peter Peterson 10/19/11
    Re: Progressive enhancement Peter Peterson 10/19/11
    Re: Progressive enhancement Marc 10/19/11

    © 2006-2011 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info