Skip to content

Instantly share code, notes, and snippets.

@rodrigo-x
Created October 15, 2012 00:15
Show Gist options
  • Save rodrigo-x/3890244 to your computer and use it in GitHub Desktop.
Save rodrigo-x/3890244 to your computer and use it in GitHub Desktop.
snippet - teste de plugin..
;(function($){
Class = function(elem){
this.elem = elem;
this.$elem = $(elem);
};
Class.prototype = {
init: function(){
this.efeito();
this.cachorrada();
return this;
},
efeito: function(){
alert('Teste!');
},
cachorrada: function(){
alert('OutroTeste!');
}
}
$.fn.efeito = function(){
return this.each(function(){
new Class(this).init();
});
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment