How to Change title with jQuery
Change Document title with jQuery
Here is the all ways that you can use to change title of webpage
THE BEST METHOD TO CHANGE TITLE WITH JQUERY
<script type="text/javascript"> document.title = "New Dynamic Title with Jquery"; </script>
You just need one line to change document title dynamically. you can also update document title dynamically with this method.
Other Methods
METHOD 1 - <script type="text/javascript"> $('html head').find('title').text("New Dynamic Title with Jquery"); </script> METHOD 2 - <script type="text/javascript"> $(document).attr("title", "New Dynamic Title with Jquery"); </script> METHOD 3- //Not Supported in IE <script type="text/javascript"> $(document).ready(function() {
$(this).attr("title", "sometitle");
}); </script>
Comments
Post a Comment