Difference between revisions of "Template:Waterloo/JS/replace-title"
(Created page with "$(document).ready(function(){ console.log($('h1').text()); });") |
m |
||
Line 1: | Line 1: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
− | + | var newTitle = $('h1').text(); | |
+ | var curTitle = $('title'); | ||
+ | |||
+ | curTitle.text = newTitle; | ||
}); | }); |
Latest revision as of 05:05, 17 September 2015
$(document).ready(function(){
var newTitle = $('h1').text(); var curTitle = $('title');
curTitle.text = newTitle;
});