mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-20 17:54:23 +01:00
clean up redundant google prettify code
This commit is contained in:
parent
fd844c6d5d
commit
5193619ab0
@ -1,23 +1,16 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
// Google code prettify
|
// 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();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
prettyPrint();
|
||||||
|
|
||||||
// scroll spy logic
|
// scroll spy logic
|
||||||
// ================
|
// ================
|
||||||
|
|
||||||
var activeTarget,
|
var activeTarget,
|
||||||
position = {},
|
position = {},
|
||||||
|
$window = $(window),
|
||||||
nav = $('body > .topbar li a'),
|
nav = $('body > .topbar li a'),
|
||||||
targets = nav.map(function () {
|
targets = nav.map(function () {
|
||||||
return $(this).attr('href');
|
return $(this).attr('href');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user