shadowbox - open inline element

霸气de小男生 提交于 2019-12-23 23:16:24

问题


I am using shadowbox and jQuery.

I have it opening on page load fine.

What I want to do is.

Have the shadowbox open up and show a form where the user can enter their email address.

I then want to submit said form via ajax.

I am dumping the form on the page wrapped in a hidden div with the id of #dialog.

My question is.

How can I get the shadowbox to be opened automatically with an inline element?


回答1:


Use the Shadowbox.open method.

Shadowbox.open({
    content:    '<div id="welcome-msg">Welcome to my website!</div>',
    player:     "html",
    title:      "Welcome",
    height:     350,
    width:      350
});

You will need to change some of the params to get it to use the inline content.



来源:https://stackoverflow.com/questions/5671583/shadowbox-open-inline-element

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!