Skip to content

Instantly share code, notes, and snippets.

@DWboutin
Last active December 20, 2015 04:48
Show Gist options
  • Save DWboutin/6073005 to your computer and use it in GitHub Desktop.
Save DWboutin/6073005 to your computer and use it in GitHub Desktop.
Start for a jQuery plugin
(function($) {
'use strict';
$.fn.pluginName = function(options, callback) {
//this selector
var thisEl = $(this);
// options
var settings = {
};
// append the settings array to options
if(options) {
$.extend(settings, options);
}
if (typeof callback === "function") {
callback();
}
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment