#5005 closed bug (duplicate)
jQuery 1.3.2 and nightly HTML title change bug in IE8
Reported by: | mrsugar | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | manipulation | Version: | 1.3.2 |
Keywords: | ie8 html title unexpected call to method | Cc: | |
Blocked by: | Blocking: |
Description
Hi guys,
I was working on changing html title via a small script using this following method:
$("html title").html(docTitle+" | "+currentTitle);
That throw an "unexpected call to method or property access" error in IE8. After switching the method to:
document.title = docTitle+" | "+currentTitle;
The error went away. Not sure if this is IE or Jquery.
Change History (5)
comment:1 Changed 14 years ago by
comment:2 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
The correct cross-browser way to alter the title is by assigning to the document.title property.
comment:3 Changed 12 years ago by
Component: | unfiled → manipulation |
---|---|
Milestone: | 1.3.2 |
Priority: | minor → low |
Resolution: | worksforme |
Status: | closed → reopened |
comment:4 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
Note: See
TracTickets for help on using
tickets.
I experienced a similar issue today in IE8 with the following code:
$("title").html("Lorem ipsum");
Using jQuery unminified rev 6246 I tracked the error down to the append: function on lines 252-257. Turns out that when the tagName is TITLE, line 255 throws an error.
The original function is:
I edited the function (naturally, thereby killing the functionality with respect to titles) and made the error go away:
document.title = "Lorem Ipsum"
does indeed work correctly.Hope that helps...