javascript - jQuery title flashing -
i'm working on basic chat script , having slight hickup following code. basically, i'm trying make page title "flash" similar how facebook does.
<script>     $(function(){         var title = $("title");          var flash = setinterval(function(){             $("#chatbox_2").toggleclass('notify');             (title.text == 'blah') ? title.text("new message...") : title.text('blah');         }, 900);     }); </script>   if console.log(title.text()); returns blah
can see i'm doing wrong?
change title.text == 'blah' title.text() == 'blah'
Comments
Post a Comment