Skip to content

Instantly share code, notes, and snippets.

@AaronLayton
Created March 19, 2015 13:22
Show Gist options
  • Save AaronLayton/88c8f10e5d9c25d9a7f5 to your computer and use it in GitHub Desktop.
Save AaronLayton/88c8f10e5d9c25d9a7f5 to your computer and use it in GitHub Desktop.
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