Created
August 28, 2016 05:17
-
-
Save MuhammedMahdy/c8e2d47e649949046ec6f9c2f3260de1 to your computer and use it in GitHub Desktop.
jquery plugin template
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
; | |
"use strict"; | |
(function ($) { | |
// the default settings | |
var defaults = { | |
}; | |
function ZoomInput(element, options) { | |
var widget = this; | |
widget.config = $.extend(true, {}, defaults, options); | |
widget.element = element; | |
$.each(widget.config, function (key, val) { | |
if (typeof val === "function") { | |
widget.element.on(key + ".zoomInput", function (e, param) { | |
return val(e, widget.element, param); | |
}); | |
} | |
}); | |
this.init(); | |
} | |
// methods | |
ZoomInput.prototype.init = function () { | |
}; | |
// the main function | |
$.fn.ZoomInput = function (options) { | |
new ZoomInput(this, options); | |
return this; | |
}; | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment