When opening a modal via
<a class="use-ajax" data-dialog-type="modal" href="/search">Search</a>
Drupal does fire contexts via JS.
These context do not contain any dialog/modal specific code.
How to react on a modal opening and how to identify the modal?
I want to add an class to the modal for styling purposes depending on its content.
Perfect would be something like
<a class="use-ajax" data-dialog-type="modal" data-dialog-class="modal-class-for-search-view" href="/search">Search</a>
Also can I somehow open a modal via JS only?
In this moment I can just open static predefined modals by using the html code:
<a class="use-ajax" data-dialog-type="modal" href="/search">Search</a>
Thanks
Comments
Comment #2
mogio_hh CreditAttribution: mogio_hh commentedComment #3
mogio_hh CreditAttribution: mogio_hh commentedComment #4
mogio_hh CreditAttribution: mogio_hh commentedComment #5
markhalliwell