tuupola/jquery_chained — pull request #21 by Tarendai (2014-01-23 13:31:45+00:00)
Title: added support for data attributes if available instead of classes

Implements https://github.com/tuupola/jquery_chained/issues/20

If a `data-chained` attribute is present, it will be used, if it isn't, it'll fallback to the class based system currently used. This solves issues such as values containing spaces etc causing problems, without breaking existing usage.

I also added parameters back into the `jQuery.each` calls and used those instead of `this`. Also some minor optimisations by only doing `$(element)` once and reusing the result.