I created this code for a conference website that I had been tasked to do. It is a simple fade in and out loop using window.setInterval. I've tested it on firefox, safari and google Chrome. The first 2 just stop responding after awhile, while google chrome gives me a note saying that the script uses too much memory. Which part of my script is using too much memory and how should I rectify it ?
As the conference site is currently used for marketing, I have to revert to my backup copy. Therefore, I am unable to give a URL for this problem. I will, however, provide one as soon as I get my dummy site up
<span id="alertTxt" style="text-align:center; color:#CC0000; display:none">Director of Information Technology, Network Communications, Security, Smart Metering, Operations, C-Level Executives</span>
<span id="alertTxt2" style="text-align:center; color:#CC000; display:none">This Conference is for You!</span>
<script type="text/javascript">
function animateTxt() {
$j("#alertTxt").fadeIn(2000);
$j("#alertTxt").delay(6000).fadeOut(1500);
animateTxt2();
window.setInterval("animateTxt()",22000);
}
function animateTxt2() {
$j("#alertTxt2").delay(1500).fadeIn(2000);
$j("#alertTxt2").delay(6000).fadeOut(1500);
}
animateTxt();
</script>