Here's the code:
<a href="http://localhost/ja/" class="current">JP</a><span class="bogo_slash"> / </span><a href="http://localhost/">EN</a>
If I select either JP/EN, i want to have an underline below there.
Thanks!
Here's the code:
<a href="http://localhost/ja/" class="current">JP</a><span class="bogo_slash"> / </span><a href="http://localhost/">EN</a>
If I select either JP/EN, i want to have an underline below there.
Thanks!
seeing from your code you just have two static pages. just add
<style>
a {
text-decoration: none;
}
a.current {
text-decoration: underline;
}
</style>
and class="current"
to whichever page you're on
Edit : If it's a single page, you can use this javascript
<a href="http://localhost/jp" id="jp">JP</a><span class="bogo_slash"> / </span><a href="http://localhost/" id="en">EN</a>
<script>
var url = window.location.href;
var link = document.getElementById("jp").getAttribute("href");
if (link == url) {
document.getElementById("jp").classList.add("current");
} else {
document.getElementById("en").classList.add("current");
}
</script>
<style>
a {
text-decoration: none;
}
a.current {
text-decoration: underline;
}
</style>