Change Window/Document Title with jQuery

jquery-logo-large1

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

Never Miss Any Web Tutorials, Guides, Tips and Free eBooks

Join Our Community Of 50,000+ Web Lovers and get a weekly newsletter in your inbox

 

I hate spam too. Unsubscribe at any time.

1 thought on “Change Window/Document Title with jQuery”

Leave a Comment