Is there a way to show the percentage inside the jQuery UI Progressbar?

Does the jQuery user interface support a number inside the Progressbar, for example:

alt text

+3
source share
2 answers

Do not redo the old thread, but I tried to do it tonight and used the following in my CSS:

.progressBarClass{ 
    height:20px;
    width:300px;
    margin:0 auto;
}   

.progressBarClassspan { 
    width:300px;
    position:absolute;
    text-align:center;
    font-weight:bold;
}   

And in my HTML there is the following:

<script type="text/javascript">
        $(function() {
             $( ".progressBarClass" ).progressbar({
                  value: 50
             });
        });
</script>

<div class="progressBarClass"><span>50%</span></div>

Is there a trick for me, although I need to come up with a better method that allows percentages in the .ui-progressbar class instead of fixed values.

+9
source

If this is not an official way, you can add it. Just view the generated code with FireBug on Mozzila, get the container id / class and add the numbers there.

jQuery UI progressbar, , , ...

0

Source: https://habr.com/ru/post/1768766/


All Articles