Back to all examples

Rating

PHP
<?php
require_once '../lib/Kendo/Autoload.php';
?>

<div class="demo-section k-content">
    <h4>Rating</h4>
    <?php
        $rating = new \Kendo\UI\Rating('rating');

        echo $rating->render();
    ?>
</div>

<script>
    $(document).ready(function () {
        var rating = $("#rating").getKendoRating();

        rating.wrapper.kendoTooltip({
            filter: ".k-rating-item",
            content: function (e) {
                return e.target.data("title");
            }
        });
    });
</script>