Created
December 8, 2011 10:13
-
-
Save richardbenson/1446631 to your computer and use it in GitHub Desktop.
Why I love jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createDialog(strName, intWidth, strHeader, strTemplate, funcOnLoad, objButtons) { | |
var dialog = $('<div id="' + strName + '"><div style="text-align: center"><img src="/assets/images/ajax-loader.gif" /></div></div>').dialog({ | |
modal: true, | |
open: function () { | |
if (typeof (strTemplate) != "undefined") $(this).load(strTemplate, funcOnLoad); | |
}, | |
close: function (event, ui) { | |
$(this).remove(); | |
}, | |
width: intWidth, | |
title: strHeader, | |
resizable: false | |
}); | |
if (typeof (objButtons) != "undefined") $(dialog).dialog("option", "buttons", objButtons); | |
return dialog; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment