I’m using simple-modal
http://www.ericmmartin.com/projects/simplemodal/
I have one modal that opens on a button click, is it possible to have a button within the modal that it opens trigger a second modal?
Thanks so much!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, but you can’t register clicks to HTML that doesn’t exist yet, which it might not in this case. That’s what that ‘onShow’ option is for. If you register events after the modal has shown itself, it should work. You might also want to unbind the new button before binding in case the modal caches that button in HTML (which would result in rebinding and refiring the function multiple times).
or you could just do delegation on the curtain. see JQuery.delegate (they may have updated that recently depending on what version of JQ you’re using)
I hope you’re not wanting two at the same time. It’s probably not set up for that. It would be easy enough to hack but from a UI perspective, ew in most scenarios.