On Oct 22, 10:37 pm, Chuck Harmston <ch...@chuckharmston.com> wrote: > Per the jQuery docs <http://docs.jquery.com/Plugins/Authoring>, plugins > should *not* directly reference the jQuery object; they should do it in a > scope-controlled closure executed at creation with jQuery passed to it as a > parameter. This way, plugins can safely use the $ shortcut without worrying > about whether or not noConflict mode is on, whether it is assigned to a > separate namespace (like django.jQuery), etc; you simply need to change the > parameter passed to the closure. In the case of django.jQuery, it should > look like this: > > (function( $ ){ > $.fn.myPlugin = function() { > this.each(function() { > this.doSomething(); > }); > }; > > })( django.jQuery ); >
I know this, but that's not the point. I could change "jQuery" to "django.jQuery" for my own jquery plugins, but then I will be forced to duplicate the plugin file: one using "django.jQuery" for the admin and an other using "jQuery" for the rest of the site. And that's not good ... In addiction, I don't want to edit jQuery UI, and to make it work without loading an other instance of jquery I *must* load it before jquery.init.js (that calls noConflict(true)). -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.