Thursday, 18 November 2010

jQuery line to reflect h1 in page title

Quite often you want the title tag of your page to be the same as your title. This little jQuery line will do that for you.

$('title').text($('h1:first').text());

No comments:

Post a Comment