I want to fade effect of the div, the following script doesn't work. What can be the problem? Thanks a lot.
function fadeIn(){
$('test').invoke("fade", {
from: 0,
to: 1,
afterFinish: function() {
$('test').setStyle({
display: 'block'
});
}
});
}
<div class='top'>
<div id="test" style="display:none">
Fade in test
</div>
</div>
<a href="#" onClick="fadeIn(); ">Click me</a>