I have a simple mootools toogle script which show 1 div, while concealing others.
Which works perfectly but its animation is very boring and simple…
Can somebody help making it a fancy? Like slide in or fade in/fadeout?
JS:
lastone='empty';
function showIt(lyr)
{
if (lastone!='empty') lastone.style.display='none';
lastone=document.getElementById(lyr);
lastone.style.display='block';
}
html:
<a href="JavaScript:;" onClick="showIt('topnavsearch')"; ">search</a>
<div id="topnavsearch" style="display:none;">
Search block
</div>