mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-15 15:29:22 +01:00
Merge pull request #89 from karthikv/clean-up
Made JavaScript Unobtrusive and Removed Unused Class
This commit is contained in:
commit
fd844c6d5d
@ -1,10 +1,22 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
// Google code prettify
|
||||||
|
// ================
|
||||||
|
|
||||||
|
// cache $(window), as it is used in scroll spy logic later on
|
||||||
|
var $window = $(window);
|
||||||
|
|
||||||
|
$window.load(function() {
|
||||||
|
// prettyPrint cannot be set as the event handler to load directly; see
|
||||||
|
// http://google-code-prettify.googlecode.com/svn/trunk/README.html
|
||||||
|
prettyPrint();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// scroll spy logic
|
// scroll spy logic
|
||||||
// ================
|
// ================
|
||||||
|
|
||||||
var activeTarget,
|
var activeTarget,
|
||||||
$window = $(window),
|
|
||||||
position = {},
|
position = {},
|
||||||
nav = $('body > .topbar li a'),
|
nav = $('body > .topbar li a'),
|
||||||
targets = nav.map(function () {
|
targets = nav.map(function () {
|
||||||
@ -127,4 +139,4 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
|
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body onload="prettyPrint();">
|
<body>
|
||||||
|
|
||||||
<!-- Topbar
|
<!-- Topbar
|
||||||
================================================== -->
|
================================================== -->
|
||||||
@ -1383,4 +1383,4 @@ Lorem ipsum dolar sit amet illo error <a href="#" title="below">ipsum</a> verita
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
<div class="topbar">
|
<div class="topbar">
|
||||||
<div class="fill">
|
<div class="fill">
|
||||||
<div class="container fixed">
|
<div class="container">
|
||||||
<h3><a href="#">Project name</a></h3>
|
<h3><a href="#">Project name</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="active"><a href="#">Home</a></li>
|
<li class="active"><a href="#">Home</a></li>
|
||||||
@ -71,4 +71,4 @@
|
|||||||
</div> <!-- /container -->
|
</div> <!-- /container -->
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user