Dynadot โ€” .com Registration $8.99

CSS Issue

Spacemail by SpaceshipSpacemail by Spaceship
Watch

snike

Established Member
Impact
3
I have this script that is supposed to fade content in a div element in and out.

content > fades away to blank > new content fades in

This is the basic setup:

Code:
function displayMenu(currentMenu) {
setTimeout("fadeOut()",0);
setTimeout("fadStay()",1000);
setTimeout('ps_change(currentMenu)',1100);
setTimeout("fadeIn()",1200);
};

The problem I am having has to deal with line 4 of the code. I can't get the ps_change() to run. ps_change changes the content in the div. The content fades away and the content reappears unchanged. Any help is appreciated.

This is ps_change():
Code:
function ps_change (cMenu) {
var thisMenu = document.getElementById(cMenu).innerHTML;
document.getElementById('ps_area').innerHTML = thisMenu;
}

Thanks!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
The vars need to be outside of the string, try this.

Code:
function displayMenu(currentMenu) {
setTimeout("fadeOut()",0);
setTimeout("fadStay()",1000);
setTimeout("ps_change(" + currentMenu + ")",1100);
setTimeout("fadeIn()",1200);
};
 
1
•••
It works! Thank you!
 
0
•••
Glad to hear :)
 
0
•••
The script really works.Thanks
 
0
•••
Trying to get CSS-based websites to look the same across all browsers can often be difficult. Many of the problems however lie with Internet Explorer implementing CSS commands differently to other, more standards compliant browsers.
____________
SEO
Search Engine Optimization
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back