0

If I use javascript:

document.title="something";

It does work internally.

I have also tried jQuery:

$(this).attr("title", "sometitle");

Which works inside $(document).ready(function(){});

But how can I change the tittle when any event happen? Like click on the button or something like that.

Matt
  • 74,352
  • 26
  • 153
  • 180
user1012513
  • 2,089
  • 17
  • 14
  • 1
    What's the question? Sounds like everything is working. You can change the title whenever you want. – Ariel Oct 25 '11 at 10:23
  • possible duplicate of [How to create flashing page title effect like facebook?](http://stackoverflow.com/questions/3381462/how-to-create-flashing-page-title-effect-like-facebook) – Matt Oct 25 '11 at 10:25
  • You should be using `$(document).attr("title", "sometitle");` instead of `$(this).attr("title", "sometitle");`. – Matt Oct 25 '11 at 10:27
  • I guess this is what you`re looking for: [Make Browser Window Blink in Task Bar](http://stackoverflow.com/questions/37122/make-browser-window-blink-in-task-bar) – Zagor23 Oct 25 '11 at 10:53

1 Answers1

1

yes you can change it at anytime. example on click

$('#blah').click(function(){
    //do some stuff
    document.title = 'now changed'; 
});
Moin Zaman
  • 25,281
  • 6
  • 70
  • 74