Answer the question
In order to leave comments, you need to log in
How to track location.hash changes?
Good afternoon.
There has been such a problem:
1. There is the following html code:
A wrapper for displaying a modal window:
<div class="modal" id="auto1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="myModalLabel">{modalLabel}</h3>
</div>
<div class="modal-body">
<p>
{modalContent}
</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Закрыть</button>
</div>
</div>
<a id="bhmenu1" class="bhmenu" href="#auto1" data-toggle="modal">
Автоматизация документооборота
</a>
href="auto1"
href="auto2"
Answer the question
In order to leave comments, you need to log in
window.addEventListener('hashchange', hashchange);
function hashchange(){
var hash = location.hash;
/* do something */
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question