Issue with --data-ajax--url and jquery 1.11.2 #2969

loic opened this Issue Jan 26, 2015 · 6 comments


None yet

4 participants

loic commented Jan 26, 2015

--data-ajax--url is ignored while the deprecated --data-ajax-url work. demonstrates the issue.

@kevin-brown kevin-brown added this to the 4.0 milestone Jan 28, 2015
@kevin-brown kevin-brown added the bug label Jan 28, 2015

Just following up on this some more based on conversations on IRC.

This appears to be a difference in how jQuery 1.x and 2.x parse the data attributes. I've created two jsbins that clearly reproduce the differences.


This is definitely a jQuery bug, as the HTML5 dataset attribute requires that the second dash is left. Here is a jsbin that confirms it:,js,output

@kevin-brown kevin-brown added a commit that referenced this issue Feb 10, 2015
@kevin-brown kevin-brown Add jQuery 1.x data attribute note
This adds a note about how nested data attributes do not work in
jQuery 1.x due to a bug with the `$` method.

This is for #2969.

I added a note to the documentation about this in caeb0ec, but unfortunately it does not look like the fix will be released for jQuery any time soon. As there is not much that we can do, aside from preferring dataset when possible, I'm going to close this off once I implement the dataset check.

That will still mean that it still won't work in older browsers (IE 10 and below), but there isn't much that we can do about it.

@kevin-brown kevin-brown added a commit that closed this issue Feb 24, 2015
@kevin-brown kevin-brown Added `.dataset` fallback for jQuery 1.x
As we have established already, jQuery 1.x does not correctly handle
`data-*` attributes where there are multiple dashes.  This makes it
so we can still handle nested options when working with jQuery 1.x
by using the `.dataset` option that is supported by all major
browsers as well as IE 11+.

Browser support tables for the `.dataset` attributes can be found at

A notice was already added to the documentation about this in

The related ticket in the jQuery repository about this issue is

This closes #2969.
@kevin-brown kevin-brown removed the bug label Feb 24, 2015

I think there should be a workaround for this (with attributes). Or is it there already?

onokazu commented Aug 2, 2015

The documentation still says that this is not supported with jQuery 1.x, or has this been resolved with the recent changes in jquery?


This is still an issue with jQuery 1.x and was not fixed in the recent 1.11.3 release.,js,output

It is still fixed in the jQuery 2.x line and upcoming 3.x line.


Can't we have an alternative syntax to get it working with jquery 1.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment