]> source.dussan.org Git - jquery.git/commitdiff
Global found in dataAttr function
authortimmywil <tim.willison@thisismedium.com>
Fri, 6 May 2011 18:54:47 +0000 (14:54 -0400)
committertimmywil <tim.willison@thisismedium.com>
Fri, 6 May 2011 18:54:47 +0000 (14:54 -0400)
src/data.js

index c2fd558f05a7dd2ba39c31f04de836219c67b896..9e5d1ab0b970d801ebb9e12d8a605d6a5ccc8c77 100644 (file)
@@ -284,7 +284,7 @@ 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 ) {
-               name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
+               var name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
 
                data = elem.getAttribute( name );