diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2013-03-01 19:02:57 -0500 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2013-03-01 19:02:57 -0500 |
commit | 3212a293695221df402317633adf63698d95efd1 (patch) | |
tree | 77b33ce1844d5d0319d87480c9953bb909094e41 /src | |
parent | 9f981c84a5b9de7d9d3d465763476ff2682c5f24 (diff) | |
download | jquery-3212a293695221df402317633adf63698d95efd1.tar.gz jquery-3212a293695221df402317633adf63698d95efd1.zip |
Fixes #13548. .data should not miss attr() set data-* with hyphenated property names
Diffstat (limited to 'src')
-rw-r--r-- | src/data.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/data.js b/src/data.js index 786477f64..fb97d2fda 100644 --- a/src/data.js +++ b/src/data.js @@ -264,6 +264,14 @@ jQuery.fn.extend({ if ( data !== undefined ) { return data; } + + // Attempt to get data from the cache + // with the key camelized + data = data_user.get( elem, camelKey ); + if ( data !== undefined ) { + return data; + } + // Attempt to "discover" the data in // HTML5 custom data-* attrs data = dataAttr( elem, key, undefined ); |