"But it does not work." What is happening, is the window not showing or is the window showing without the content?
I have had problems with modal windows in the past with z-index problems and with conflicts with other parts of my css (off-canvas elements overriding the normal modal operations). If you hard code a modal onto the page you are working on, does it show properly?