This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Aj_s
    Participant

    Is there a way in jqxrating to show its value on jqxrating’s hover??


    Dimitar
    Participant

    Hello Aj_s,

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.arctic.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxrating.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                // Create jqxRating
                $("#jqxRating").jqxRating({ width: 350, height: 35, theme: 'classic' });
                $("#jqxRating").mouseenter(function () {
                    var value = $("#jqxRating").jqxRating("val");
                    $("body").append("value: <em>" + value + "</em><br />");
                });
                $("#jqxRating").on('change', function (event) {
                    $("#rate").find('span').remove();
                    $("#rate").append('<span>' + event.value + '</span');
                });
            });
        </script>
    </head>
    <body class='default'>
        <div id='jqxWidget' style="font-size: 13px; font-family: Verdana;">
            <div id='jqxRating'>
            </div>
            <div style='margin-top: 10px;'>
                <div style='float: left;'>
                    Rating:</div>
                <div style='float: left;' id='rate'>
                </div>
            </div>
        </div>
    </body>
    </html>

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.