开发者

JQuery for Push-down form

开发者 https://www.devze.com 2023-01-28 11:33 出处:网络
Is there a JQuery plugin that allows me to \'unhide\' a form by after clicking a link? Like I have an invite link that can take me to a one text field form for an email address but I want this form to

Is there a JQuery plugin that allows me to 'unhide' a form by after clicking a link? Like I have an invite link that can take me to a one text field form for an email address but I want this form to just drop down (pushing the rest of the content down also) and shows the form to submit the email. If you guys can think of a JQuery plugin that lets me do this, please let me know

Edit: So I did this

<div class='add-link'>
        <div id='invite_link'><a href=''>Invite User</a></div>
        <div id='invitation_form'>
            <form>
                <input type='text'/>
            </form>
        </div>
    </div>

and my jquery looks like

<script type="text/javascript">
$(function() 
    { 
        $("table").tables开发者_运维百科orter({sortList:[[0,0],[2,1]], widgets: ['zebra']}); 
                $('#invitation_form').hide();
    } 
);

$('#invite_link').click(function() {
    $('#invitation_form').slideDown();
});

Do you guys see any error that causes the form not to slide down. It hides the form when the page loads but when I click the link it is not sliding down.


$('a.mylink').click(function() {
    $('#MyForm').slideDown();
});


I don't think you need a jQuery plugin for this. The base jQuery library should be sufficient.

$('#showFormLink').click(function () {
  $('#form').slideDown();
});

If you're looking for animation, that's possible as well by passing in a duration argument to slideDown.

Take a look at the jQuery show documentation.

0

精彩评论

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