Skip to content

Instantly share code, notes, and snippets.

@jaz303
Created November 1, 2010 22:29
Show Gist options
  • Save jaz303/658991 to your computer and use it in GitHub Desktop.
Save jaz303/658991 to your computer and use it in GitHub Desktop.
Hacking Boxy.load to return dialog immediately
Boxy.load = function(url, options) {
options = options || {};
var boxy = null;
var ajax = {
url: url, type: 'GET', dataType: 'html', cache: false, success: function(html) {
html = jQuery(html);
if (options.filter) html = jQuery(options.filter, html);
boxy.setContent(html);
if (options.center) {
boxy.center();
}
boxy.show();
}
};
jQuery.each(['type', 'cache'], function() {
if (this in options) {
ajax[this] = options[this];
delete options[this];
}
});
boxy = new Boxy('', jQuery.extend({}, options, {show: false}));
return boxy;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment