Hailwood
Hailwood

Reputation: 92691

shadowbox - open inline element

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?

Upvotes: 2

Views: 1059

Answers (1)

th3mus1cman
th3mus1cman

Reputation: 406

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.

Upvotes: 1

Related Questions