I am working on creating my first jQuery based plugin but I am stuck at an issue.
I receive an error stating var minHeight is undefined when I am trying to console.log it.
(function ($) {
$.fn.ezToggle = function (options) {
var defaults = {
selector: $('.selector'),
minHeight: defaults.selector.height(),
speed: 200
}
console.log(defaults.minHeight); // appears undefined
};
})(jQuery);