Skip to content

Instantly share code, notes, and snippets.

@smoofles
Created November 24, 2008 16:08
Show Gist options
  • Save smoofles/28510 to your computer and use it in GitHub Desktop.
Save smoofles/28510 to your computer and use it in GitHub Desktop.
/* • lpl modal */
/* lepilo modal dialog */
lpl.modal = function() {
// Holds a reference to the Instance of lpl.modal
var self = this;
this.init = function() {
$('#cancel_modal').mouseup(function() {
// $(this) - The caller DOM element
// self - The Object instance registering the event
self.cancelModal();
});
};
this.openModal = function(message, type) {
$('#lpl_modal').fadeIn(250);
$('#lpl_modal_dialog .content').slideDown(250);
$('#lpl_modal_dialog').slideDown(350);
}
this.closeModal = function() {
console.log("closeModal");
$('#lpl_modal_dialog .content').slideUp(500);
$('#lpl_modal').fadeOut(750);
};
this.cancelModal = function() {
console.log("cancel");
this.closeModal();
};
this.init();
return this;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment