H
H
hobzy2020-05-06 18:18:41
JavaScript
hobzy, 2020-05-06 18:18:41

How to make the modal window write to the url not #modal but /Chat when opened?

How to make the modal window write to the url not /#modal but /Chat when opened? like
when opening another modal window, the first one was closed, or 3, etc.
, and how, when clicking on the links, the page remained and did not load, and the block changed
https://drgn.gold/
5eb2d5f425f31633095788.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
ninja op op, 2020-05-08
@hobzy

Try the following:

<a data-toggle="modal" data-target="#modal" onclick="history.pushState(null, null, '/Chat');">Открыть модальное окно</a>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question