New Overlay
by Chase Wilson
JavaScript
/*
* Overlay
*/
(function($){
var Overlay = window.Overlay = function(element, options){
this.element = $(element);
//merge options with defaults
this.options = $.extend({
'width': 350,
'height':250,
'call':'something',
'modal':true,
'rel':'loading',
'closebutton':true,
'dropshadow':true,
'mask':{
active:true,
opacity:.5,
closeButton:true,
clickClose: true
},
'events':{
onCloseAfter:function(){return true;},
onCloseBefore: function(){return true;},
onOpen:function(){return true;},
onContentLoaded:function(){return true;}
}
}, options || {});
this.initialize();
};
Overlay.prototype = {
initialize: function(){
var self = this;
alert('Overlay');
},
launch: function(){
var self = this;
},
openWindow: function(){
var self = this;
},
closeWindow: function(){
var self = this;
},
initWindow: function(){
var self = this;
}
};
})(jQuery);
/*
* Overlay Mask
*/
(function($){
var Mask = Overlay.Mask = {
initMask: function(){
var self = this;
if(!self.mask){
var mask = $('#mask');
self.mask = (mask.length <= 0)?createMask():mask;
self.mask.css({
'width':$(window).width(),
'height':$(document).height(),
'opacity': 0,
'z-index':5000
}).fadeIn();
if(settings.mask.clickClose) {
self.mask.click(function(){
...