Side navigation
#13380 closed bug (invalid)
Opened February 04, 2013 07:04AM UTC
Closed February 26, 2013 08:59AM UTC
problem of attr
Reported by: | fuweichin@gmail.com | Owned by: | fuweichin@gmail.com |
---|---|---|---|
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
Attachments (0)
Change History (2)
Changed February 12, 2013 03:32AM UTC by comment:1
owner: | → fuweichin@gmail.com |
---|---|
status: | new → pending |
Changed February 26, 2013 08:59AM UTC by comment:2
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?