bensmithett/dragster — pull request #2 by nicholasrq (2014-02-01 07:45:55+00:00)
Title: jQuery support for Dragster

I've just created jQuery support for Dragster (in separate file, course).

It works like regular `Dragster` class but uses jQuery to provide smart event binding (like jquery `.on()`). One more feature of `DragsterJquery` is ability to define parent of element which will listen for Dragster events:

```coffeescript
new DragsterJquery(element[, parent = document])
```

For example, if you want to isolate your drop area with specific ID you can do so by providing `parent` argument when instantiating class:

```coffeescript
form = $('#customer_form')
new DragsterJquery('.drop_zone', form)

form.on 'dragster:enter', '.drop_zone', (e)->
form.addClass('.hover')

form.on 'dragster:enter', '.drop_zone', (e)->
form.removeClass('.hover')
```

Of course you can use both selectors and jQuery objects. Also `DragsterJquery` supports native `HTMLElement`.