Created
March 19, 2015 13:22
-
-
Save AaronLayton/88c8f10e5d9c25d9a7f5 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
var MaterialEffect = { | |
self: null, | |
modalContent: null, | |
baseClass: "material-box", | |
openClass: "material-box--show", | |
contentClass: "material-box__content", | |
init: function(){ | |
self = $("<div />").addClass(baseClass); | |
modalContent = $(contentClass, self); | |
}, | |
openModal: function(elm, content, position){ | |
modalContent.html(content); | |
self.position( elm.offset() ) | |
}, | |
closeModal: function(){ | |
} | |
}; | |
var Remarkable = {}; | |
(function(self){ | |
// your code | |
var options = { | |
baseClass: "material-box", | |
option2: 3223 | |
} ; | |
var privateVar = "secret"; | |
self.init = function(userOptions){ | |
options = $.extend({}, options,userOptions); | |
}; | |
self.openModal = function(elm, content, position){ | |
}; | |
})(Remarkable || {}) | |
material.init({ | |
baseClass: "aarons-material" | |
}) | |
$(".selector").on("click", function(e){ | |
e.preventDefault(); | |
MaterialEffect.openModal($(this), $(this).html() ); | |
}) | |
$(".selector").on("click", function(e){ | |
e.preventDefault(); | |
MaterialEffect.openModal($(this), $(this).html() ); | |
}) | |
$(".selector").on("click", function(e){ | |
e.preventDefault(); | |
MaterialEffect.openModal($(this), $(this).html() ); | |
}) | |
$(".selector").on("click", function(e){ | |
e.preventDefault(); | |
MaterialEffect.openModal($(this), $(this).html() ); | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment