From 5a4b6621528a4e1be957accff9ecb45d11d79eaf Mon Sep 17 00:00:00 2001 From: "Alexander S. Klenin" Date: Tue, 7 Sep 2010 13:12:49 +1100 Subject: [PATCH] Fix localizing of 'input' tags under jQuery 1.4+ It seems that attr('tagName') returns undefined in the modern jQuery (See http://stackoverflow.com/questions/1532331/can-jquery-provide-the-tag-name) In any case 'is' seems stylistycally preferable. --- src/jquery.localize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery.localize.js b/src/jquery.localize.js index c1a52a9..5bd6456 100644 --- a/src/jquery.localize.js +++ b/src/jquery.localize.js @@ -51,7 +51,7 @@ elem = $(this); key = elem.attr("rel").match(/localize\[(.*?)\]/)[1]; value = valueForKey(key, data); - if (elem.attr('tagName') == "INPUT") { + if (elem.is('input')) { elem.val(value); } else {