Opened 10 years ago
Closed 10 years ago
#13380 closed bug (invalid)
problem of attr
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
jQuery attr returns undefined while UA implementations return empty string
$("html").attr("lang") undefined $("html")[0].lang ""
var locale=$("html").attr("lang").replace("-","_"); TypeError: Cannot call method 'replace' of undefined
and I have to write it like this: var locale=$("html")[0].lang.replace("-","_");
Tested in Chrome/24.0.1312.57
Bug found in v1.8.2 while it is okay in v1.4.2
Change History (2)
comment:1 Changed 10 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
comment:2 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
So if there is no
lang
attribute on thehtml
element it should returnundefined
. Can you provide a test case on jsfiddle.net that shows what the problem is?