Appear with sliding effect?
I have a div I'm making appear when a form is submitted.
document.getElementById('onsubmit').style.display = 'block';
I want it to make it appear with a sliding effect. So it moves everything down as it makes size for itself.
I believe it's done with jquery but I have no idea how. Anyone cou开发者_JAVA百科ld give me a hand?
Thanks
Check out the fiddle...
Demo 1: http://jsfiddle.net/UnsungHero97/YRXA4/
Demo 2: http://jsfiddle.net/UnsungHero97/YRXA4/1/
So instead of using the .click()
event, you would use the .submit()
event.
I hope this helps.
Hristo
try this...
$('#onsubmit').slideDown('slow', function() {
// Animation complete.
});
精彩评论