From: timmywil Date: Fri, 6 May 2011 18:54:47 +0000 (-0400) Subject: Global found in dataAttr function X-Git-Tag: 1.6.1rc1~22 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c864455ccfad13895d2af6ba287f265ee64bd348;p=jquery.git Global found in dataAttr function --- diff --git a/src/data.js b/src/data.js index c2fd558f0..9e5d1ab0b 100644 --- a/src/data.js +++ b/src/data.js @@ -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 );