Hide DAB html until selected.
This commit is contained in:
parent
4d175c8733
commit
5b0b720a45
|
@ -70,7 +70,7 @@ a.new { color: red; }
|
|||
<a href="#" onclick="return cancel_selection({{ dab.num }})">cancel selection</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="dab-article" id="dab-article-{{ dab.num }}">{{ dab.html | safe }}</div>
|
||||
<div class="dab-article d-none" id="dab-article-{{ dab.num }}">{{ dab.html | safe }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -90,6 +90,14 @@ a.new { color: red; }
|
|||
function jump_to(dab_num) {
|
||||
var highlight_title = "text-bg-primary";
|
||||
|
||||
var dab_articles = document.getElementsByClassName("dab-article");
|
||||
for(var i=0; i<dab_articles.length; i++) {
|
||||
dab_articles[i].classList.add("d-none");
|
||||
}
|
||||
|
||||
var dab_article = document.getElementById("dab-article-" + dab_num);
|
||||
dab_article.classList.remove("d-none");
|
||||
|
||||
var links = document.getElementsByTagName("a");
|
||||
for(var i=0; i<links.length; i++) {
|
||||
links[i].classList.remove("disambig-highlight");
|
||||
|
|
Loading…
Reference in a new issue