<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/lib/bootstrap.min.css">
<script src="/lib/jquery-1.12.2.min.js"></script>
<script src="/lib/bootstrap.min.js"></script>
<style>
</style>
</head>
<body>
<div class="container-fluid" style="background-color:#2196F3;color:#fff;height:200px;">
<h1>Bootstrap affixed-bottom.bs.affix</h1>
<p>Scroll to the bottom of this page.</p>
<p><strong>The affixed-bottom.bs.affix event occurs when the .affix class has been replaced with the .affix-bottom class.</strong></p>
</div>
<br>
<div class="container">
<div class="row">
<nav class="col-sm-3">
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#section1">Section 1</a></li>
<li><a href="#section2">Section 2</a></li>
<li><a href="#section3">Section 3</a></li>
</ul>
</nav>
<div class="col-sm-9">
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
<h1>Some text to enable scrolling</h1>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('.nav').affix({offset: {bottom: 50} });
$('.nav').on('affixed-bottom.bs.affix', function(){
alert('The navigation menu is about to return to its original bottom position - The .affix class has been replaced with .affix-bottom');
});
});
</script>
</body>
</html>