i have a page where a form is submitted to the same page, using php (no ajax). if the query that writes the data to the db is successful it sets $marker = 1;
in the <head> of my page i then i have the code below, which tries to achieve the "yellow fade" technique: a message appears to indicate success and then slowly fades out. problem is that with the code below, it appears for just a split second and then abruptly disappears. could anyone tell me why and how to get this to work? <? if ($marker == 1) { ?> <script type="text/javascript"> $(document).ready(function(){ $("#nav").after("<span class='yellowFade'>Homepage updated!</ span>"); $("span.yellowFade").fadeOut("slow"); }); </script> <? } ?>