Skip to content

Commit

Permalink
Merge pull request twbs#89 from karthikv/clean-up
Browse files Browse the repository at this point in the history
Made JavaScript Unobtrusive and Removed Unused Class
  • Loading branch information
mdo committed Aug 26, 2011
2 parents ebfe465 + 0a34a6d commit fd844c6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
16 changes: 14 additions & 2 deletions docs/assets/js/application.js
@@ -1,10 +1,22 @@
$(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
// ================

var activeTarget,
$window = $(window),
position = {},
nav = $('body > .topbar li a'),
targets = nav.map(function () {
Expand Down Expand Up @@ -127,4 +139,4 @@ $(document).ready(function(){

});

});
});
4 changes: 2 additions & 2 deletions docs/index.html
Expand Up @@ -29,7 +29,7 @@
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
</head>

<body onload="prettyPrint();">
<body>

<!-- Topbar
================================================== -->
Expand Down Expand Up @@ -1383,4 +1383,4 @@ <h3>Operations and grid system</h3>
</div>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions examples/hero.html
Expand Up @@ -25,7 +25,7 @@

<div class="topbar">
<div class="fill">
<div class="container fixed">
<div class="container">
<h3><a href="#">Project name</a></h3>
<ul>
<li class="active"><a href="#">Home</a></li>
Expand Down Expand Up @@ -71,4 +71,4 @@ <h2>Heading</h2>
</div> <!-- /container -->

</body>
</html>
</html>

0 comments on commit fd844c6

Please sign in to comment.