ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

jQuery Conflict. Pass $ at instantiation?

Open benmj opened this issue 13 years ago • 4 comments

I'm integrating an AngularJS app that uses ng-grid within a larger CMS (Joomla) that relies upon MooTools. This is causing a conflict, as $ is being interpreted as Mootools and not jQuery. I've edited the first and end lines of the source and it fixes the issue:

(function(window, $) {
...
}(window, jQuery));

I've seen no detrimental behavior. Is something like this a candidate for inclusion in the core source?

benmj avatar Mar 20 '13 22:03 benmj

I don't see why not. all it does is explicitly use jQuery within the enclosure. we will use this in the 2.0.3 release.

orneryd avatar Mar 22 '13 16:03 orneryd

It's a common defensive pattern in jquery plugin development

roblarsen avatar Mar 22 '13 16:03 roblarsen

Great!

benmj avatar Mar 22 '13 18:03 benmj

fixed in 7695a1053277d9610c68e416f90db96cd2b8c8ed

orneryd avatar Mar 29 '13 21:03 orneryd