Previously I had been doing:
My HTML:
<span id="foo" data-foo-bar="42">The Answer</span>
My "jquery":
const fooElement = $('#foo');
const fooBar = fooElement.data('foo-bar'); // 42
// or
const fBar = fooElement.data()['foo-bar']; // 42
But after I upgraded jquery (to 3.0) I get this:
const fooElement = $('#foo');
const fooBar = fooElement.data('foo-bar'); // undefined
// or
const fBar = fooElement.data()['foo-bar']; // undefined
How can I fix this?
What changed?