Skip to content

Instantly share code, notes, and snippets.

@pifantastic
Created October 28, 2010 04:25
Show Gist options
  • Save pifantastic/650631 to your computer and use it in GitHub Desktop.
Save pifantastic/650631 to your computer and use it in GitHub Desktop.
// <a href="" class="make-dialog" dialog-width="100" dialog-height="100" title="Testing a popup">Test</a>
$("a.make-dialog").badAssDialog();
$.fn.badAssDialog = function() {
this.each(function() {
var $this = $(this);
$this.click(function() {
$('<div></div>').load(this.href).dialog({
height: ($this.attr("dialog-height") || 100),
width: ($this.attr("dialog-width") || 100),
});
return false;
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment