开发者

Appear with sliding effect?

开发者 https://www.devze.com 2023-02-28 19:13 出处:网络
I have a div I\'m making appear when a form is submitted. document.getElementById(\'onsubmit\').style.display = \'block\';

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.
  });
0

精彩评论

暂无评论...
验证码 换一张
取 消