Line 12: | Line 12: | ||
<script> | <script> | ||
window.onload = () => { | window.onload = () => { | ||
+ | var activated; | ||
var svg = document.getElementById("hero-image").getSVGDocument(); | var svg = document.getElementById("hero-image").getSVGDocument(); | ||
Line 30: | Line 31: | ||
}); | }); | ||
$(svg.getElementById("bio")).on('click', function (e) { | $(svg.getElementById("bio")).on('click', function (e) { | ||
− | + | if (activated) {activated.popover('hide');} | |
+ | activated = e; | ||
}); | }); | ||
Line 49: | Line 51: | ||
$(svg.getElementById("engineering")).on('click', function (e) { | $(svg.getElementById("engineering")).on('click', function (e) { | ||
− | + | if (activated) {activated.popover('hide');} | |
+ | activated = e; | ||
}); | }); | ||
Line 77: | Line 80: | ||
placement: 'top' | placement: 'top' | ||
}); | }); | ||
− | + | $(svg.getElementById("integrated")).on('click', function (e) { | |
+ | if (activated) {activated.popover('hide');} | ||
+ | activated = e; | ||
+ | }); | ||
// // // | // // // | ||
$(svg.getElementById("hpsilver")).hover(function () { | $(svg.getElementById("hpsilver")).hover(function () { | ||
Line 90: | Line 96: | ||
placement: 'top' | placement: 'top' | ||
}); | }); | ||
+ | $(svg.getElementById("hpsilver")).on('click', function (e) { | ||
+ | if (activated) {activated.popover('hide');} | ||
+ | activated = e; | ||
+ | }); | ||
// // // | // // // |
Revision as of 12:32, 26 October 2017