-
Task
-
Resolution: Fixed
-
Major
-
1.0, 1.0.1
-
None
-
-
Empty show more show less
-
Empty show more show less
As more and more people upgraded to Magnolia 4.4.1 and 4.4.2, issues regarding different javascript libs conflicting with jQuery (which is the js framework used by this module) started to emerge. The $ function, in particular, is the source of most problems, as almost any js lib will define it in its own peculiar way, included Magnolia js itself. In short, the module should provide a way to make jQuery.noConflict mode configurable via the usual module config mechanism. It would probably also make sense to set the value as true by default. A concrete use case where the noConflict mode set to false would make sense is that of MediaCatalyst (see MGNLSLOCK-6). They only use jQuery and, of course, make heavy use of the $ alias. For them, setting the noConflict mode to true would mean replacing everywhere in their scripts $ with jQuery, (even though an alternative to this could be possibly wrapping and isolating jQuery code with something like this
jQuery(document).ready(function($) {
// Code that uses jQuery's $ can follow here.
});
)