Open Foundation 6 reveal modal via...

User 2885740 Photo


Registered User
59 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
3,752 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.

The Help You Need: When You Need It The Most
Website Design & Development
Website Renovations
Wayans' Theme Park
Watch Listen & Learn Video Tutorials

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.