Change Window/Document Title with jQuery

Last modified on by Karthikeyan K


Today I am going tell  how to dynamically change document’s / window’s title using JavaScript and jQuery.

The best way to change the document title is to use native javascript api document.title.

document.title = "New Window Title by Javascript";

The equivalent jQuery code of js code above.

$(document).prop('title', 'New Window Title by jQuery');
$("title").text('New Window Title by jQuery');

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *