Tagged: ,

This topic contains 2 replies, has 2 voices, and was last updated by  Andybazz 11 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • SQL input from Slider value #14438

    Andybazz
    Member

    I have the following code

    $(document).ready(function () {
    $(“Slider”).jqxslider();
    });

    and want to take the value of the slider display it under the slider in a “text” box as I move the slider have you got any pointers on how to do this – pretty new to Java

    Thanks

    Andy

    SQL input from Slider value #14440

    support
    Participant

    Hi Andy,

    You can trigger the ‘change’ event of jqxSlider. That event is raised when the slider’s value is changed.

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/jquery-1.9.0.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxslider.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    $('#slider').jqxSlider({});
    $('#slider').bind('change', function (event) {
    var value = event.args.value;
    $("#textInput").val(parseInt(value));
    });
    });
    </script>
    </head>
    <body class='default'>
    <div id='slider'>
    </div>
    <br />
    <input type="text" id="textInput" />
    </body>
    </html>

    Best Regards,
    Mariya

    jQWidgets Team
    http://www.jqwidgets.com

    SQL input from Slider value #14443

    Andybazz
    Member

    Thanks Mariya – that worked perfectly
    regards

    Andy

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

You must be logged in to reply to this topic.