I have two PHP scripts:
- header.php
- contact_us.php
In Index.php
when the user clicks the menu, it smoothly slides down.
But for the "Contact Us" page I don't want that behavior; because it is so simple, containing only a link, I just want it to come up quickly and remain until the home link is clicked in the menu.
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<?php
if(basename($_SERVER['SCRIPT_FILENAME']) == 'index.php'){
?>
<nav>
<ul class="nav navbar-nav">
<li><a href="#" class="active">Home </a> </li>
<li><a href="#services">Services</a> </li>
<li><a href="#search">Search For Homes</a> </li>
<li><a href="#recent">Recent Transacctions</a></li>
</ul>
</nav>
<?php
}else{
?>
<nav>
<ul class="nav navbar-nav">
<li><a href="index.php" class="active">Home </a> </li>
<li><a href="service.php">Services</a> </li>
<li><a href="search.php">Search For Homes</a> </li>
<li><a href="recent.php">Recent Transacctions</a></li>
</ul>
</nav>
<?php
}
?>
</div>