Skip to content

Instantly share code, notes, and snippets.

@durgesh97025
Last active July 7, 2023 15:28
Show Gist options
  • Save durgesh97025/8b618d684a6659ded112a47bee032dae to your computer and use it in GitHub Desktop.
Save durgesh97025/8b618d684a6659ded112a47bee032dae to your computer and use it in GitHub Desktop.
Show Progress Bar in Dialog. Useful during ajax operations
$(document).ready(function(){
$("BODY").append('<div id="dialog-message" title="In Progress">\
<div id="progressbar"></div>\
</div>');
});
function ShowDialog() {
$( "#dialog-message" ).dialog({
dialogClass: "no-close",
modal: true
});
$( "#progressbar").progressbar({
value: false
});
}
function HideDialog(){
$( "#dialog-message" ).dialog( "close" );
}
/*
<!-- This style is for ProgressDialog.js -->
<style>
#progressbar .ui-progressbar-value {
background-color: #ccc;
}
.no-close .ui-dialog-titlebar-close {
display: none;
}
</style>
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment