Re: Django and jQuery, I don't get it

2016-06-10 Thread Stephen J. Butler
Specifically, this style is called an Immediately Invoked Function Expression, or IIFE. https://en.wikipedia.org/wiki/Immediately-invoked_function_expression On Fri, Jun 10, 2016 at 3:36 AM, ludovic coues wrote: > > (function($) { > > 'use strict'; > > > > })(django.jQuery); > > Th

Re: Django and jQuery, I don't get it

2016-06-10 Thread ludovic coues
> (function($) { > 'use strict'; > > })(django.jQuery); This syntax is called a closure. First you declare a function so you don't contaminate the global scope with your local declared variable. Then you execute your function. I will assume django.JQuery is the version of JQuery shipp

Re: Django and jQuery, I don't get it

2016-06-09 Thread Mike Dewhirst
I can't help at all with jquery but IIRC there is a question in the Admin "Are you sure?" when you try deleting something from a list view. Might be a start Mike On 10/06/2016 1:06 AM, Olivier Dalang wrote: Hi ! I'm using several modules that rely on jQuery, and have some own needs as well :

Django and jQuery, I don't get it

2016-06-09 Thread Olivier Dalang
Hi ! I'm using several modules that rely on jQuery, and have some own needs as well : - admin > - grappelli > - autocomplete light > - session security > ... I also see that there are tons of different variables that reference jQuery, defined by theses modules, some of which are the same, and s