This is the code I have right now with jQuery. 1.fiddle. What I want is to create the same scenario without jQuery. This is where I ended up. 2. fiddle.
Can anyone point out what I have done wrong here?? (As far as I can think of, my problem is with the CSS Selectors
)
Thank you.
The is no .hide()
method in HTML. To hide an element, set the display
style to none
.
setTimeout(function()
{
document.getElementById("blocker").style.display = "none";
}, 3000);
Also, the original CSS can work without jQuery.
Try below. Don't use hide()
in native javascript.
setTimeout(function()
{
document.getElementById("blockid").style.display = "none";
}, 1000);
There is no function hide() in native javascript. Replace the hide()
function with following line.
document.getElementById("blocker").style.display = 'none';