Rating Official Website

Bootstrap Rating is a jQuery plugin that creates a rating control that uses Bootstrap glyphicons for rating symbols

Css
<!-- Rating plugin -->
<script src="wwwroot/assetslibs/bootstrap-rating/bootstrap-rating.css"></script>
Javascript
<!-- Rating plugin -->
<script src="wwwroot/assetslibs/bootstrap-rating/bootstrap-rating.min.js"></script>
Initjs (Custom js)
<!-- rating init -->
<script src="wwwroot/assetsjs/pages/rating-init.js"></script>
Add Package
yarn add bootstrap-rating --save
Remove Package
yarn remove bootstrap-rating or you can remove package by removing specific package from package.json
Examples:
Title Javascript
Common js
$(function () {
            $('input.check').on('change', function () {
                alert('Rating: ' + $(this).val());
            });
            $('.rating-tooltip').rating({
                extendSymbol: function (rate) {
                    $(this).tooltip({
                        container: 'body',
                        placement: 'bottom',
                        title: 'Rate ' + rate
                    });
                }
            });
            $('.rating-tooltip-manual').rating({
                extendSymbol: function () {
                    var title;
                    $(this).tooltip({
                        container: 'body',
                        placement: 'bottom',
                        trigger: 'manual',
                        title: function () {
                            return title;
                        }
                    });
                    $(this).on('rating.rateenter', function (e, rate) {
                        title = rate;
                        $(this).tooltip('show');
                    })
                        .on('rating.rateleave', function () {
                            $(this).tooltip('hide');
                        });
                }
            });
            $('.rating').each(function () {
                $('')
                    .text($(this).val() || '')
                    .insertAfter(this);
            });
            $('.rating').on('change', function () {
                $(this).next('.badge').text($(this).val());
            });
        });
© Skote.