1
1
libssh/doc/that_style/js/striped_bg.js
Andreas Schneider 5334cb9d55 doc: Update doxygen documentation
This fixes some issues with the new docs and uses a new modern style.

https://github.com/jl-wynen/that_style

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-29 11:05:47 +02:00

33 строки
945 B
JavaScript

// Adds extra CSS classes "even" and "odd" to .memberdecls to allow
// striped backgrounds.
function MemberDeclsStriper () {
var counter = 0;
this.stripe = function() {
$(".memberdecls tbody").children().each(function(i) {
// reset counter at every heading -> always start with even
if ($(this).is(".heading")) {
counter = 0;
}
// add extra classes
if (counter % 2 == 1) {
$(this).addClass("odd");
}
else {
$(this).addClass("even");
}
// advance counter at every separator
// this is the only way to reliably detect which table rows belong together
if ($(this).is('[class^="separator"]')) {
counter++;
}
});
}
}
// execute the function
$(document).ready(new MemberDeclsStriper().stripe);