jQuery ProgressBar Change Options Dynamically

To change any of the widget options dynamically you need to get the initial options, change the desired properties and call the widget refresh(options) method, passing the new values.
This is demonstrated in the code below:

<div id="progress1"></div>
<script type="text/javascript">
    value: 10,
    max: 200
function changeOptions() {
    var progress1 = $("#progress1").swidget(),
    options = progress1.initialOptions;
    options.max = 500;