Skip to content
Snippets Groups Projects
Commit c86eec58 authored by Matei Zaharia's avatar Matei Zaharia Committed by Aaron Davidson
Browse files

SPARK-1135: fix broken anchors in docs

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.

Author: Matei Zaharia <matei@databricks.com>

Closes #3 from mateiz/doc-links and squashes the following commits:

e2a3488 [Matei Zaharia] SPARK-1135: fix broken anchors in docs
parent fbedc8ef
No related branches found
No related tags found
No related merge requests found
// 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 = {
......@@ -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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment