How to set Page Title using jQuery

Well sometimes it required to change the title of page dynamically after some event like button click. So in this post, I will show you how to change/set page title using jQuery. You can easily achieve it via single line of code. All you need is to set new value to title attribute of the document object.
//Code Starts
   $(document).attr("title", "New Title");
//Code Ends
Feel free to contact me for any help related to jQuery, I will gladly help you.

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..