This is my first question, so forgive me if I do not apply the right etiquette.
I have a javascript function that hides a div with fading.
function fadeOut(cloudChatHide)
{
"use strict";
cloudChatHide.onclick = function()
{
if(cloudChatHide.className)
{
cloudChatHide.className = '';
}
else
{
cloudChatHide.className = 'fadeout';
RemoveCloudChat();
}
};
}
However, this code does not remove the DIV, which is a RemoveCloudChat function. It looks like this: -
function RemoveCloudChat()
{
"use strict";
cloudChatHide.remove();
cloudChatHide.className ='fadeout';
}
What I really want to do automatically disappears automatically after a few seconds, and then DELETES it.
The reason I need to REMOVE the div from the window is because its overlay div and I need to access the content under the cloudChatHide cloud.
Any help / instruction wouild is greatly appreciated since I am not the biggest Javascript developer.
Thank.
source
share