There's no need to use jQuery to change the title. Try:
document.title = "blarg";
See this question for more details.
To dynamically change on button click:
$(selectorForMyButton).click(function(){
document.title = "blarg";
});
To dynamically change in loop, try:
var counter = 0;
var titleTimerId = setInterval(function(){
document.title = document.title + '>';
counter++;
if(counter == 5){
clearInterval(titleTimerId);
}
}, 100);
To string the two together so that it dynamically changes on button click, in a loop:
var counter = 0;
$(selectorForMyButton).click(function(){
titleTimerId = setInterval(function(){
document.title = document.title + '>';
counter++;
if(counter == 5){
clearInterval(titleTimerId);
}
}, 100);
});