<script> $(window).on('load', function() {
// var pathname = window.location.pathname; // Returns path only var url = window.location.href; // Returns full URL // var origin = window.location.origin; var words = url.split('#'); var check=words[1]; // alert(check); if(check=='how')
{
// alert("this is how"); // var element=document.getElementById('how');
// hownav=display:inline // how=active // console.log("yo ho:"+element); $('#how').addClass('in active'); $('.checkactive4').removeClass('in active'); $("#hownav").css("display", "inline");
// element.addClass("active");
}
if(check=='what')
{
$('#what').addClass('in active'); $("#whatnav").css("display", "inline"); // alert("this is what"); }
if(check=='mission')
{
$('#mission').addClass('in active'); $("#missionnav").css("display", "inline"); // alert("this is mission"); }
if(check=='team')
{
$('#team').addClass('in active'); $("#teamnav").css("display", "inline"); // alert("this is mission"); }
// document.getElementById('') // alert(check);
// var pathArray = window.location.pathname.split('/'); // console.log(words); })
</script>
<body>
<div class="collapse navbar-collapse navbar-left" id="myNavbar"> <ul class="navbar-nav nav" id="myDIV"> <li><a data-toggle="tab" class="btn " href="#mission">OUR MISSION</a><span id="missionnav" style="display:none" class="checkactive"></span></li> <li><a data-toggle="tab" class="btn " href="#how"> HOW WE WORK?</a><span id="hownav" style="display:none" class="checkactive2"></span></li> <li><a data-toggle="tab" class="btn" href="#what">WHAT WE DO?</a><span id="whatnav" style="display:none" class="checkactive3"></span></li> <li><a data-toggle="tab" class="btn" href="#team">TEAM</a><span style="display:none" id="teamnav" class="checkactive4"></span></li> </ul>
</div>
</body>
Comments
Post a Comment