I'm curious as to the reasoning behind the standard procedure of prefixing jQuery plugin filenames with "jquery.". Several tutorials state something like:
The use of the "jquery." prefix eliminates any possible name collisions with files intended for use with other libraries.
I believe I have even seen a couple of plugins that actually require themselves not be renamed.
Are there any more specific reasons for this prefix, or is it simple the convention?
It's just a convention, for example:
jquery.lightbox.js
prototype.lightbox.js
If you just had this and were using both, well, you see where confusion sets in:
lightbox.js
Also, you might be using just vanilla JavaScript function files, and not want those to have a prefix, e.g. editor.js
, denoting it has no reliance on jQuery at all...it's all around organization and maintainability.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With