I need to add a Modal popup window, but I can’t figure out how to do this with haml. Now the modal trigger is activated, but it shows a blank screen with a characteristic dimming.

haml:

%a.modal-trigger{:href => 'modal1'} Modal #modal1.modal .modal-content %h4 Modal Header %p Modal text 

js:

  $(document).ready(function(){ // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered $('.modal-trigger').leanModal(); }); 

Closed due to the fact that off-topic participants D-side , cheops , zRrr , user194374, Nick Volynkin 9 Jun '16 at 6:17 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - D-side, cheops, zRrr, Community Spirit, Nick Volynkin
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Did it work on HTML? - D-side
  • Yes, it works fine. - lif3ar
  • one
    So compare the markup of something: D - D-side
  • Everything, understood, I passed a nuance when I threw in haml. In the original # modal1, and I wrote without "#")) Thank you. - lif3ar
  • And once again the debugging triumph: D - D-side

0