Skip to content
Browse files

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.
  • Loading branch information...
1 parent 343d111 commit 5a4b6621528a4e1be957accff9ecb45d11d79eaf @klenin committed Sep 7, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/jquery.localize.js
View
2 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 {

0 comments on commit 5a4b662

Please sign in to comment.
Something went wrong with that request. Please try again.