In my project, I create a scrollspy like http://jsfiddle.net/hiepnx/8SDQZ/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css") />
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
</head>
<body data-spy="scroll" data-target="#main-nav">
<div class="container">
<header class="row">
<!-- Navigation Bar -->
<nav id="main-nav" class="navbar navbar-default navbar-fixed-top navbar-inverse darken" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li><a href="#slider">Home</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#portfolio">Portfolio</a></li>
<li><a href="#testimonials">Testimonials</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav><!-- End of Navigation Bar -->
</header>
<section id="slider" style="height:900px; background-color:red;">
</section>
<section id="services" style="height:900px; background-color:yellow;">
</section>
<section id="portfolio" style="height:900px;background-color:purple;">
</section>
<section id="testimonials" style="height:900px;">
</section>
</div>
</body>
</html>
Now, I want to make the effect like in homepage of mediafire.com.
The effect is the navbar is invisible in first page and only become visible when we scroll to second page.
How can I do it?
Thanks,