I am using some nested layouts in Ruby on Rails, and in one of the layouts i have a need to read in a string from a div and set that as the title of the document. What is co
Do not use $('title').text('hi'), because IE doesn't support it.
$('title').text('hi')
It is better to use document.title = 'new title';
document.title = 'new title';