Hi everyone!
I'm trying to make some code which finds if a div exists, and if it does then have it fade away slowly. I have this to determine whether or not the div exists
if($('#error').length != 0) { $('#error').hide(500); }
And that does work but only on a refresh, I've been attempting to put it in a timer like this:
var refreshId = setInterval(function() { if($('#error').length != 0) { $('#error').hide(500); } }, 500);
But its not getting rid of the innerHTML! I have some code which on hover alters the innerHTML of the error div so I can fill it up, but for some reason this isn't working, any advice would help!
Thank you!