How to hide panel in the following script?

I use the following plugin . In the resulting pane there is a link by clicking on which POPs up a modal window.
<div id="widget-1">
 <div class="text-center title-button">
 Please choose the required section!
 <ul class="list-unstyled">
 the <li><a href="#" class="btn btn-alt2">link 1</a></li>
 the <li><a href="#" class="btn btn-alt2">link 2</a></li>
 the <li><a href="#" class="btn btn-alt2">link 3</a></li>
 the <li><a href="#myModalBox" class="btn btn-alt3" data-toggle="modal" id="online">link 4</a></li>

How to make by clicking on the "link 4" of the panel widget was hidden, and a modal window opened. Now on clicking the link a window appears and the panel itself is a widget too, hangs.
July 8th 19 at 11:36
1 answer
July 8th 19 at 11:38
$('a[data-toggle="modal"]').on('click', function(){
Unfortunately it is not working. I already tried almost the same method. Only instead of a[data-toggle="modal"] indicated #online - alvina commented on July 8th 19 at 11:41

Find more questions by tags jQuery