New to Kendo UI for jQuery? Download free 30-day trial

Getting Started with the Rating

This guide demonstrates how to get up and running with the Kendo UI for jQuery Rating.

After the completion of this guide, you will be able to achieve the following end result:

    <input id="rating" />

    <script>
    $("#rating").kendoRating({
        min: 1,
        max: 6,
        value: 3
    });
</script>

1. Create an Input Element

First, create an <input> element on the page.

<input id="rating" />

2. Initialize the Rating

In this step, you will initialize the Rating from the <input> element. All settings of the Rating will be provided in the initialization script statement and you have to describe its layout and configuration in JavaScript.

<input id="rating" />

<script>
    // Target the input element by using jQuery and then call the kendoRating() method.
    $("#rating").kendoRating();
</script>

3. Set the Min and Max Options

You can define the values of the first and the last items through the min and max options.

<input id="rating" />

<script>
  // Target the input element by using jQuery and then call the kendoRating() method.
  $("#rating").kendoRating({
    min: 1,
    max: 6
  });
</script>

4. Set the Value of the Rating

You can set the value of the Rating upon initialization.

<input id="rating" />

<script>
  // Target the input element by using jQuery and then call the kendoRating() method.
  $("#rating").kendoRating({
    min: 1,
    max: 6,
    value: 3
  });
</script>

Next Steps

See Also

In this article