Home › Forums › JavaScript › jQuery Plugin Conditional Logic › Reply To: jQuery Plugin Conditional Logic
May 10, 2014 at 10:53 am
#169734
dyr
Participant
Thanks for all your help Mottie!
In looking at my code did you have any other general suggestions for ways to improve it? ( organization, naming, etc.)
I’ve updated the PEN with a few changes:
http://codepen.io/shawkdsn/pen/emFpG
I think it makes less sense to have a default mode and limit for a plugin of this type since it’s more or less impossible to assume either of those values so to me there are no “safe” defaults. Instead I believe configuration should be mandatory and the plugin should throw errors if things are not correctly set up. Thoughts?