Skip to content

Commit

Permalink
SPARK-1135: fix broken anchors in docs
Browse files Browse the repository at this point in the history
A recent PR that added Java vs Scala tabs for streaming also
inadvertently added some bad code to a document.ready handler, breaking
our other handler that manages scrolling to anchors correctly with the
floating top bar. As a result the section title ended up always being
hidden below the top bar. This removes the unnecessary JavaScript code.
  • Loading branch information
mateiz committed Feb 26, 2014
1 parent c852201 commit e2a3488
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions docs/js/main.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@

// From docs.scala-lang.org
function styleCode() {
if (typeof disableStyleCode != "undefined") {
return;
}
$(".codetabs pre code").parent().each(function() {
if (!$(this).hasClass("prettyprint")) {
var lang = $(this).parent().data("lang");
if (lang == "python") {
lang = "py"
}
if (lang == "bash") {
lang = "bsh"
}
$(this).addClass("prettyprint lang-"+lang+" linenums");
}
});
console.log("runningPrettyPrint()")
prettyPrint();
}


function codeTabs() {
var counter = 0;
var langImages = {
Expand Down Expand Up @@ -97,11 +74,7 @@ function viewSolution() {
}


$(document).ready(function() {
$(function() {
codeTabs();
viewSolution();
$('#chapter-toc').toc({exclude: '', context: '.container'});
$('#chapter-toc').prepend('<p class="chapter-toc-header">In This Chapter</p>');
makeCollapsable($('#global-toc'), "", "global-toc", "Show Table of Contents");
//styleCode();
});

0 comments on commit e2a3488

Please sign in to comment.