You missed off the jQuery constructor function literal ($
) in your if()
statement:
if( msg.data.match(/^LCERROR/) || msg.data.match(/^ERROR/) )
{
if( ! $('#consoleLog').hasClass('stop') )
{
setInterval(function() {
$('#consoleLog').animate( { backgroundColor : "#aa0000" }, 1000).animate( { backgroundColor : "black" }, 1000);
}, 100);
}
}
3
solved hasClass() is not a function Jquery [closed]