开发者

adding content to dynamic fancybox

 $.post('ajax.php', { callback: 'send_mail', name: $("#name").val() },
            function(data){
                if(data.request == 'success'){
                            $.fancybox(data.name);  


                }else{

                    alert('error');

                }
            }, 'json');

here is my ajax call in my fancybox and while it does work, it is a default fancybox. The original fancy box has these options

$('#login_page').fancybox({ 
        'scrolling'     : 'no',
        'overlayOpacity': 0.1,
        'showCloseButton'   : false

    }); 

My question is, how do I place my returned value inside the fancy box and set the options?

E开发者_如何学运维DIT:

ah I figured it out. There is an advanced option for content:


There is an option called content that allows you to input html.

"content" : "<p>sfsdfsdf</p>",
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜