/var/www/hkosl.com/tech-link/en/inc/subNav.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<div class="subNav" id="vue_subNav">
    <a class="subcatBtn" :href="subNav.link" v-for="subNav in subNavs">{{subNav.title}}</a>
</div>
<script>
$(function($) {




let url = window.location.href;
$('.subNav a').each(function() {
    if (this.href === url) {
        $(this).closest('a').addClass('active');
    }
});
});


</script>