开发者

Set a default value on Jquery progress bar

开发者 https://www.devze.com 2023-04-12 18:35 出处:网络
I\'m using this Jquery plugin http://t.wits.sg/misc/jQueryProgressBar/demo.php# and I just want to create a default value, in the HTML, when the page 开发者_如何学JAVAloads.... I don\'t need a click

I'm using this Jquery plugin

http://t.wits.sg/misc/jQueryProgressBar/demo.php#

and I just want to create a default value, in the HTML, when the page 开发者_如何学JAVAloads.... I don't need a click action or any animation...any ideas?


Pass the default value when you initialize the progress bar -

$("#pb1").progressBar(65); // Will have 65% as the default value

// Will have 95% as default value with additional options.
$("#pb4").progressBar(95, { showText: false, barImage: 'images/progressbg_red.gif'} );


$(document).ready(function() {
    var defaultProgress = $("#progressbarVal").text();
    $("#YourID").progressBar(defaultProgress);
};

And a HTML div with the value:

<div id="progressbarVal">40</div>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号