CSS Issue

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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
Close
It works! Thank you!
 
0
Close
Glad to hear :)
 
0
Close
The script really works.Thanks
 
0
Close
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
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back