How can I make a click on a route that should take me to an identifier and this identifier must perform a secondary action as modal, everything works well from the same page, since the reference from there , but in the practical exercise it must work from another page .html different.
Link code:
<li><a id="demo01" onclick="window.location.href = '#animatedModal';">DEMO01</a></li>
Div code to which you must arrive
!--DEMO01-->
<div id="animatedModal">
<!--THIS IS IMPORTANT! to close the modal, the class name has to match the name given on the ID -->
<div id="btn-close-modal" class="close-animatedModal">
CLOSE MODAL
</div>
<div class="modal-content">
<!--Your modal content goes here-->
</div>
</div>