Matthieu Matthieu - 10 months ago 55
jQuery Question

How to open modal ?

I have a link in the top menu to add a new event.
When I am on the events list page, this link open a modal with the new event form.
Howether if I am on an other page, I would like this link (in the top menu) to redirect on this events list page with the modal new event form open.

Is it possible ?

Thanks for your help


Use a hash

link is like:

<a href="/costompagewithmodal#open">link to modal page</a>

in the /costompagewithmodal you show the div if the hash open exist

if(window.location.hash == '#open') {