Skip to content

Instantly share code, notes, and snippets.

@danielcbaldwin
Created April 20, 2010 23:27
Show Gist options
  • Save danielcbaldwin/373211 to your computer and use it in GitHub Desktop.
Save danielcbaldwin/373211 to your computer and use it in GitHub Desktop.
/**
* Sample jQuery Plugin
*/
(function($) {
function Sample() {};
$.extend(Sample.prototype, {
settings: {
base_url: ''
},
init: function() {
this.sampleFunction();
},
sampleFunction: function() {
/* Sample Function Code */
}
});
//Plugin End
/**
* Event Handlers
*/
$(document).ready(function() {
if ($.sample == undefined) {
$.sample = new Sample();
}
$.sample.init();
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment