jQuery UI Widgets Forums Editors ProgressBar Loop progressbar

This topic contains 2 replies, has 2 voices, and was last updated by  Hugo 10 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Loop progressbar #65791

    Hugo
    Participant

    Hello guys,
    how to make an endless $.jqxProgressBar going back and forth quickly, like the example image below.

    progressbar

    Thanks in advance 🙂

    Loop progressbar #65820

    Dimitar
    Participant

    Hello Hugo,

    Here is what can be achieved with jqxProgressBar:

    <!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.11.1.min.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxprogressbar.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                $("#progressbar").jqxProgressBar({ height: 25, animationDuration: 0, width: 200 });
                progress();
            });
            function progress() {
                var val = $("#progressbar").val() || 0;
    
                $("#progressbar").val(val + 1);
    
                if (val >= 99) {
                    $("#progressbar").val(0);
                }
                setTimeout(progress, 10);
            }
        </script>
    </head>
    <body class='default'>
        <div id='progressbar'>
        </div>
    </body>
    </html>

    Best Regards,
    Dimitar

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

    Loop progressbar #65844

    Hugo
    Participant

    @dimitar, thank you very much!

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

You must be logged in to reply to this topic.