The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery Plugin Conditional Logic Reply To: jQuery Plugin Conditional Logic


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:

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?