jquery_chained
jquery_chained copied to clipboard
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.