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

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -