Open Foundation 6 reveal modal via...

User 2885740 Photo


Registered User
60 posts

HI Chris,

I’m not certain if this is still an issue for you. But if so, here is some code that gives you a head-start to tackle the problem. When you add this JavaScript code to the body of your page you will have the functionality you are looking for. Mind you, this code is only an example on how you could get it done. You are not done yet. The code is not perfect. And you should not put it on a live website before you made it more robust.

For example, the EventListener I added is not perfect. It closes the modal when the user clicks on the modal. But this is not exactly the same behavior as the modal has, when opening the page in the ordinary way. I invite you to improve this EventListener.

You have to make sure that the links you send in emails, look like this:
www.arkansaslocalbusinessreview.com/mul … l?id=img11
This is needed, while in the script a parameter with the name “id” is expected. And the value of the parameter must be the id of the image you like to show.

Good luck.
Attachments:
User 2699991 Photo


Registered User
4,797 posts
Online Now

René wrote:
HI Chris,

I’m not certain if this is still an issue for you. But if so, here is some code that gives you a head-start to tackle the problem. When you add this JavaScript code to the body of your page you will have the functionality you are looking for. Mind you, this code is only an example on how you could get it done. You are not done yet. The code is not perfect. And you should not put it on a live website before you made it more robust.

For example, the EventListener I added is not perfect. It closes the modal when the user clicks on the modal. But this is not exactly the same behavior as the modal has, when opening the page in the ordinary way. I invite you to improve this EventListener.

You have to make sure that the links you send in emails, look like this:
www.arkansaslocalbusinessreview.com/mul … l?id=img11
This is needed, while in the script a parameter with the name “id” is expected. And the value of the parameter must be the id of the image you like to show.

Good luck.

Hi Rene
he sorted it out, he used a different gallery, I did sort it out for the foundation reveal component, quite a simple method using stable JavaScript and zurb foundation modal attributes.
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS
Contact Me For One To One Assistance
https://alphathemes.coffeecup.com/forms … an%281%29/

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.