Difference between revisions of "Team:Dundee/navbar"

(Created page with "<html> <head> <title>Dundee iGEM 2015</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- remove when hosted --> <link href="cs...")
 
Line 103: Line 103:
 
     </nav>
 
     </nav>
 
   </div>
 
   </div>
 +
 +
 +
<script src="https://2015.igem.org/Team:Dundee/bs.js?action=raw&ctype=text/javascript"></script>
 +
<script type="text/javascript">
 +
 +
      $(function() {
 +
  //navbar affix
 +
  $('#nav').affix({
 +
    offset: {
 +
      top: $('header').height()
 +
    }
 +
  });
 +
});
 +
 +
      $('#nav .navbar-nav li>a').click(function(){
 +
  var link = $(this).attr('href');
 +
  var posi = $(link).offset().top+20;
 +
  $('body,html').animate({scrollTop:posi},700);
 +
})
 +
 +
    </script>

Revision as of 09:09, 25 June 2015

Dundee iGEM 2015