I’m trying to add this to a site: http://jqueryui.com/progressbar/#label but I only want it to load when a button is clicked rather than automatically and don’t know how to do that.
[quote=“coding_noobie, post:1, topic:221409, full:true”]
I’m trying to add this to a site: http://jqueryui.com/progressbar/#label but I only want it to load when a button is clicked rather than automatically and don’t know how to do that.[/quote]
I don’t think that you can create it and say that it’s disabled both at the same time.
After creating it, you can set disabled to be true like this:
progressbar.progressbar({"disabled": true});
Note: This doesn’t stop the progress bar from being shown. Instead it lowers its opacity to show that it’s currently disabled.
Thanks but that’s not quite what I’m after. I want to stop it being created straightaway? I want to use it as part of a download process but at the moment it’s automatically starting as soon as the page has loaded rather than when somebody clicks download.
So essentially I want it to keep saying ‘loading’ until somebody clicks the download button
I know it’s slightly off topic but is it possible to also set the download percentage too? I have a script (in another js file) that works out the percentage that’s downloaded already and I’d ideally like that to be displayed on in the bar
The percentage value is in a function called progressDone and the value I want to get is this part of the function: var percentage = $.cookie(‘downloaded’);