Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open modal on page ready #23

Closed
BMCwebdev opened this issue Apr 28, 2016 · 5 comments
Closed

Open modal on page ready #23

BMCwebdev opened this issue Apr 28, 2016 · 5 comments
Labels

Comments

@BMCwebdev
Copy link

Is there an option already built in to open the modal on page ready? I notice in the js file you have a section to look if there is only one modal on the page (on page load check if single '.modaal' exists) wondering if this is related. Thank you for the well done work.

@danhumaan
Copy link
Collaborator

Hi @BMCwebdev , There is an option available for start_open which if you set to true will open the modaa as soon as it's available without requiring a user click. You can also use the online attribute to control this with data-modaal-start-open="true".

@BMCwebdev
Copy link
Author

BMCwebdev commented May 9, 2016

Hey There @danhumaan, thank you for the heads up, and feeling sheepish that I didn't read up first to find that on my own.

However, now that I am attempting to use this attribute, I cannot seems to get it to auto open. The modal works fine when the link is clicked, but auto opening on page load is not happening. Does this markup look correct to you?
`Show

This text is a wicked big H2!

We see you have an event today. We see everything. We want to see more.

Will you let us into your phone? Trust us. Mwahahahaha!

Or Go Log Hours or something.

`

Thank you again!

@jer0dh
Copy link

jer0dh commented May 9, 2016

Looks like you may need a space before the attribute data-modaal-start-open

@BMCwebdev
Copy link
Author

BMCwebdev commented May 9, 2016

Thanks @jer0dh, but I think that was just the way the formatting looked when I pasted it in. There is a space between data-modaal-type="inline" and data-modaal-start-open="true"

@BMCwebdev
Copy link
Author

Sorry for the messages fellahs, thank you both @jer0dh and @danhumaan - all set now. There must have been a typo somewhere. It's working great now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants