feat(character/talents): add talent specialization selector
This commit is contained in:
parent
f979241e37
commit
4d63acf21d
2 changed files with 31 additions and 4 deletions
|
|
@ -40,22 +40,30 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="spec-links">
|
||||
<a href="#0" id="link-spec-0">Primary specialization</a>
|
||||
 | 
|
||||
<a href="#1" id="link-spec-1">Secondary specialization</a>
|
||||
</div>
|
||||
|
||||
<div id="talents-spec-0">
|
||||
<div>
|
||||
<h3>Glyphs</h3>
|
||||
<div class="glyphs"></div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<div id="talents-spec-1">
|
||||
<div id="talents-spec-1" style="display: none;">
|
||||
<div>
|
||||
<h3>Glyphs</h3>
|
||||
<div class="glyphs"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: none;">
|
||||
<!-- Hackfix for aowow's tooltip opening when the page loads -->
|
||||
<a href="{{aowow}}/?spell=10"></a>
|
||||
</div>
|
||||
|
||||
<script type="application/javascript">
|
||||
const talentsData = JSON.parse(`{{{data}}}`);
|
||||
|
||||
|
|
@ -91,6 +99,7 @@
|
|||
|
||||
if (nbLearned === 0) {
|
||||
$(`#talents-spec-${spec}`).hide();
|
||||
$("#spec-links").hide();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -218,4 +227,18 @@
|
|||
$arrow.css("background-position", bgPos);
|
||||
$(container).append($arrow);
|
||||
}
|
||||
|
||||
$("#link-spec-0").on("click", () => {
|
||||
$("#talents-spec-0").show();
|
||||
$("#talents-spec-1").hide();
|
||||
});
|
||||
|
||||
$("#link-spec-1").on("click", () => {
|
||||
$("#talents-spec-1").show();
|
||||
$("#talents-spec-0").hide();
|
||||
});
|
||||
|
||||
if (location.hash === "#1") {
|
||||
$("#link-spec-1").click();
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue