[ckan-dev] recline model: is the jquery dep necessary?

Rufus Pollock rufus.pollock at okfn.org
Fri Mar 30 15:06:41 UTC 2012


On 30 March 2012 15:59, James Casbon <james.casbon at okfn.org> wrote:
> Just had a go at loading the recline model parts.  Now I want to load
> them in a non browser js environment (think web worker/node.js), but
> there seems to be a jquery dependency - which may be unnecessary.   If
> it is, it would help me to reuse the data code out of the browser if
> it was dropped.
>
> For example, the code in http://okfnlabs.org/recline/src/model.js is
> wrapped in :
>
>  (function($, my) {
>     ... all the code
>  }(jQuery, this.recline.Model));
>
> Can someone enlighten me as to what this does and whether it needs
> jquery to do it?

I'm using jquery functionality a lot to find elements
($('.xxx).find(...)) and for $.each / $.map (could move all of that to
underscore).

How are you doing element selection without jquery?

Rufus




More information about the ckan-dev mailing list