Matthieu Matthieu - 1 year ago 114
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

Answer Source

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') {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download