In the past - before jQuery - it was just impossible to have more frameworks together.
Now jQuery provides no.Conflict - and that should be the reason making things such difficult?
JQuery, prototype, mootools? Everything on the same page?
Adding no.Conflict() by default will break all existing stuff.
And remember, not only Plugins - it'll break every script a user has added to his site content too.
So I think it's not a good idea to add no.Conflict() to jQuery4CMSimple.
For a "normal" jQuery-based Plugin, a developer should use "jQuery" instead of the $ shorthand.
How to do that, was posted here more than one times, e.g.:
Martin wrote:(That means, we have to use jQuery() or (function($) { /* your code in here might use $() */ })(jQuery))
YES! And that's the only thing to do - IMHO.Martin wrote:But isn't that something we should do anyway to avoid clashes with other framweorks or incompatibiliy with other plugins that do call noConflict()?
If you want to provide such plugins, you should take care if your code breaks others.jerry wrote:I have 2-3 plugins that use lightbox + prototype, and right now I have no idea how to replace lightbox with jQuery.
You had to do that (and you did that) in the past too - but now jQuery4CMSimple can help you a bit:
just check, if the plugin exists and include jquery before your own stuff. If really necessary, use no.Conflict() with all it's disadvantages.
I rewrote some of my own stuff for testing purposes to use jQuery() - just a few changes in the code.
Now it works together with other libraries and no.Conflict() (if you do it the way above).
To me it seems to be simple...
So the only code convention / proposal should be:
don't use '$' - use jQuery() or (function($) { /* your code in here might use $() */ })(jQuery))
Or am I so wrong here???
Holger