Marek123 Marek123 - 11 months ago 94
Javascript Question

Bootstrap - direct link to modal window

Is it possible to have an url like this:

www.url.com/#imprint


(or similar) to link directly to the page with the opened modal window?

is this possible? Any hints?

Thank you!

Answer Source

You might be able to do something like this.

if (window.location.hash == "#imprint") {
     $('#myModal').modal('show');
}