Forum Moderators: open
I had a graphic designer ask me about an effect we had seen, but I can not duplicate and/or remember where it was.
Here's a description of what the thing is supposed to do:
1. User clicks a link
2. Semi-transparent effect takes over the screen
3. Requested article/item shows in full color in the middle of the screen
I would think that it would be an AJAX effect where the requested content is pulled from a DB or where ever it might be. Then, it gets loaded into a div/layer that rides over a second layer that is semi-transparent to hide the page itself and bring visual focus to the requested content.
Has anyone seen/done this? If so, could you post a link or a description of how it's done?
Thanks much in advance,
Chris
It should get you started.
** Sorry if the Alpha/Opacity is coded for IE, I code mostly for a IE only Intranet App.
scott
/* --------------------------------------------------------------------
*Fade functions for Pop Up Help
*
* --------------------------------------------------------------------*/
var AlphaInterval = true;
var AlphaVal = 0;
var AlphaDir= '';
var AlphaElement;function fade(elemID,dir)
{
clearInterval(AlphaInterval);
AlphaDir = dir; // 'in' or 'out'
AlphaElement = document.getElementById(elemID);
document.getElementById("popHelp").style.display = "block";
AlphaInterval=setInterval("applyAlpha()",15);
}
function setAlpha(elemContent) //var elemContent = document.getElementById("popHelpContent");
{
AlphaElement = elemContent
AlphaElement.style.filter = "alpha(Opacity=0)";
}
function applyAlpha()
{
//AlphaElement.style.filter = "alpha(Opacity=100)";
if(AlphaDir == "in")
{
//in
if(AlphaVal <= 90) AlphaVal += 5;
AlphaElement.style.filter = "alpha(Opacity="+AlphaVal+")";
if(AlphaVal == 90)
{
clearInterval(AlphaInterval);
AlphaDir = '';
}
//
} else {
// out
if(AlphaVal != 0) AlphaVal += -5;
AlphaElement.style.filter = "alpha(Opacity="+AlphaVal+")";
if(AlphaVal <= 0)
{
clearInterval(AlphaInterval);
document.getElementById("popHelp").style.display = "none";
AlphaDir = '';
}
}
}
/* --------------------------------------------------------------------
*END PopUp Help
* --------------------------------------------------------------------*/