admin管理员组

文章数量:1402852

I've recently started learning JQuery, and I'm doing fine with it. Though, I'm using FancyBox and I'm having some trouble.

I want to display a form inside a <div> rather than an iframe. I'm not sure how to display a <div style="display: hidden;"> with FancyBox.

/

I have the form inside a hidden div tag and I want to use FancyBox to display it. Fancybox is a type of JQuery lighbox.

I've recently started learning JQuery, and I'm doing fine with it. Though, I'm using FancyBox and I'm having some trouble.

I want to display a form inside a <div> rather than an iframe. I'm not sure how to display a <div style="display: hidden;"> with FancyBox.

http://jsfiddle/nLcMh/21/

I have the form inside a hidden div tag and I want to use FancyBox to display it. Fancybox is a type of JQuery lighbox.

Share Improve this question edited Mar 24, 2013 at 18:21 Andrue asked Mar 24, 2013 at 17:12 AndrueAndrue 7073 gold badges11 silver badges27 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 4

if you need something with more options try this fiddle:

$("a.openform").click(function () {
        $.fancybox(
                $('.form').html(),
                {
                    'width'             : 950,
                    'height'            : 1100,
                    'autoScale'         : false,
                    'transitionIn'      : 'none',
                    'transitionOut'     : 'none',
                    'hideOnContentClick': false,
                    'onStart': function () {
                      //On Start callback if needed  
                    }
                 }
            );
    });

http://jsfiddle/RQQ5r/1/

Updated fiddle: http://jsfiddle/nLcMh/28/
Changed link to <a href="#form" class="openform">See Form</a>

本文标签: javascriptJQuery Fancybox FormStack Overflow