#9761 closed enhancement (duplicate)
$('title') is inconsistent
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | manipulation | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The selector $('title') returns a DOMElement in all major browsers (currently tested : IE, FF, Chrome). However, only in Chrome and FF does $('title').text("New title"); or $('title').html("New title"); works. In IE, setting new content to the <title> element (ie. $('title')[0].innerHTML = "New title";) does not work.
The only way to set this is with : document.title = "New title";
This is inconsistent, it should be documented or fixed.
Change History (3)
comment:1 Changed 12 years ago by
Component: | unfiled → manipulation |
---|---|
Priority: | undecided → low |
comment:2 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
There is no need to use jQuery at all when document.title
will do the job quickly on all browsers.
Note: See
TracTickets for help on using
tickets.
Thanks for taking the time to contribute to the jQuery project! This is such an edge case I'm not sure we should put it in the docs or change the default browser behaviors.