Created
December 30, 2010 14:24
-
-
Save fixlr/759836 to your computer and use it in GitHub Desktop.
Pseudo-code example of something I'm working on
This file contains 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
$('.button.dialog').click(function() { | |
$('#dialog').load(this.href, function() { | |
$('#dialog .close').click(function() { | |
$('#dialog').hide().html(''); | |
return false; | |
}); | |
$(document).keyup(function(e) { | |
if (e.keyCode == 27) { $('#dialog .close').click(); } // esc | |
}); | |
$(this).show(); | |
}); | |
return false; | |
}); | |
$('.button.save').click(function() { | |
// submit the form and #dialog.hide() if it exists | |
// (how to tell what form?) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment