Hello. In general, I am interested in the possibility of binding a modal window to the keys of the virtual keyboard, without inserting a piece of the modal window code itself into each key. Let me explain what I mean now:
There is a piece of code:
<a href="#" class="key" data-key="F3"><i class="a">F3</i></a> <a href="#" class="key" data-key="F4"><i class="a">F4</i></a> <a href="#" class="key" data-key="F5"><i class="a">F5</i></a> <a href="#" class="key" data-key="F6"><i class="a">F6</i></a> <a href="#" class="key" data-key="F7"><i class="a">F7</i></a> <a href="#" class="key" data-key="F8"><i class="a">F8</i></a> <a href="#" class="key" data-key="F9"><i class="a">F9</i></a> <a href="#" class="key" data-key="F10"><i class="a">F10</i></a> <a href="#" class="key" data-key="F11"><i class="a">F11</i></a> <a href="#" class="key" data-key="F12"><i class="a">F12</i></a> A modal window is attached to each key. Suppose this is F3:
<a href="#modal-center" class="key" data-key="F3" uk-toggle><i class="a">F3</i> <div id="modal-center" class="uk-flex-top " uk-modal> <div class="uk-modal-dialog uk-modal-body uk-margin-auto-vertical uk-alert-primary"> <button class="uk-modal-close-default" type="button" uk-close></button> <p>123</p> </div> So the question arises, is there any other way to bind a modal window to a key without inserting this piece of code into the code of each key?
In principle, there is nothing wrong with that, just another, more easy and less cumbersome way to solve this problem is interesting.