mirror of
https://github.com/jquery/jquery.git
synced 2026-01-25 19:58:27 -05:00
Bug in rmultidash. Fixes #10194
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
var rbrace = /^(?:\{.*\}|\[.*\])$/,
|
||||
rmultiDash = /([a-z])([A-Z])/g;
|
||||
rmultiDash = /([A-Z])/g;
|
||||
|
||||
jQuery.extend({
|
||||
cache: {},
|
||||
@@ -316,7 +316,8 @@ function dataAttr( elem, key, data ) {
|
||||
// If nothing was found internally, try to fetch any
|
||||
// data from the HTML5 data-* attribute
|
||||
if ( data === undefined && elem.nodeType === 1 ) {
|
||||
var name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
|
||||
|
||||
var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
|
||||
|
||||
data = elem.getAttribute( name );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user