Created
September 15, 2009 22:55
-
-
Save ocharles/187735 to your computer and use it in GitHub Desktop.
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
Overlay = { | |
init: function(elementToOverlay, content, options) { | |
this.options = $.extend({ | |
element: 'div', | |
attributes: {} | |
}, options); | |
this.overlay = $(html[this.options.element](this.options.attributes, content)) | |
.click(this.hideOverlay) | |
.addClass('overlay-hint') | |
.show(); | |
this.under = elementToOverlay.hide().after(this.overlay); | |
this.overlay.show(); | |
}, | |
hideOverlay: function() { | |
this.under.show(); | |
this.overlay.hide(); | |
} | |
} | |
}; | |
Overlay.init.prototype = Overlay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment