Question

I have coded myself into a corner. Does anyone know the answer? Thanks!

Was it helpful?

Solution

This will work also:

$('title').text("Boo");

OTHER TIPS

document.title = 'new value';

Is this not working for you?

Try:

$(document).ready(function() {
    this.title = 'foo'
})

Maybe this will help you:

$(document).attr('title', 'new title');

$('title').text("Boo"); is not good idea because IE8 has problem with that.
this bug is reported Here but jQuery developers did not solve that and their solution is Use document.title='Boo';.

my idea is that

  1. using document.title is best option and it is cross browser solution
  2. but if you are used to use jQuery you can use $(document).attr('title', 'new title');. i tested it and has no problem with major browsers and IE8
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top