jQuery Button 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:

<button id="but1" ></button>
<script type="text/javascript">
    $("#but1").shieldButton({
        toggle: true,
         checked: true
    });
function changeOptions() {
    var but = $("#but1").swidget(),
    options = but.initialOptions;
    options.enabled = false;
    but.refresh(options);
}
</script>