mirror of
https://git.proxmox.com/git/pve-docs
synced 2025-07-29 12:10:01 +00:00
asciidoc.js: use jQuery instead of $
This commit is contained in:
parent
68b856935a
commit
a7d40e1f89
@ -9,7 +9,7 @@ var asciidoc = {
|
|||||||
|
|
||||||
// toc generator
|
// toc generator
|
||||||
toc: function () {
|
toc: function () {
|
||||||
var tocholder = $("#toc");
|
var tocholder = jQuery("#toc");
|
||||||
if (!tocholder) {
|
if (!tocholder) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -20,8 +20,8 @@ var asciidoc = {
|
|||||||
var html = "<div id=\"toctitle\"><h2>Contents</h2></div><ul>";
|
var html = "<div id=\"toctitle\"><h2>Contents</h2></div><ul>";
|
||||||
|
|
||||||
var n = 0;
|
var n = 0;
|
||||||
$("#asciidoccontent div.sect1").each(function(){
|
jQuery("#asciidoccontent div.sect1").each(function(){
|
||||||
var h = $(this).find("h2").first();
|
var h = jQuery(this).find("h2").first();
|
||||||
var id = h.attr("id");
|
var id = h.attr("id");
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
n++;
|
n++;
|
||||||
@ -42,7 +42,7 @@ var asciidoc = {
|
|||||||
|
|
||||||
// footnote generator
|
// footnote generator
|
||||||
footnotes: function () {
|
footnotes: function () {
|
||||||
var noteholder = $("#footnotes");
|
var noteholder = jQuery("#footnotes");
|
||||||
if (!noteholder) {
|
if (!noteholder) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -54,9 +54,9 @@ var asciidoc = {
|
|||||||
var n = 0;
|
var n = 0;
|
||||||
var inner_html = '';
|
var inner_html = '';
|
||||||
|
|
||||||
$("#asciidoccontent span.footnote").each(function(){
|
jQuery("#asciidoccontent span.footnote").each(function(){
|
||||||
n++;
|
n++;
|
||||||
var span = $(this);
|
var span = jQuery(this);
|
||||||
var note = span.attr("data-note");
|
var note = span.attr("data-note");
|
||||||
var id = span.attr("id");
|
var id = span.attr("id");
|
||||||
if (!note) {
|
if (!note) {
|
||||||
@ -80,8 +80,8 @@ var asciidoc = {
|
|||||||
|
|
||||||
if (n != 0) {
|
if (n != 0) {
|
||||||
// process footnoterefs.
|
// process footnoterefs.
|
||||||
$("#asciidoccontent span.footnoteref").each(function(){
|
jQuery("#asciidoccontent span.footnoteref").each(function(){
|
||||||
var span = $(this);
|
var span = jQuery(this);
|
||||||
var href = span.find("a").first().attr("href");
|
var href = span.find("a").first().attr("href");
|
||||||
href = href.match(/#.*/)[0]; // in case it return full URL.
|
href = href.match(/#.*/)[0]; // in case it return full URL.
|
||||||
n = refs[href];
|
n = refs[href];
|
||||||
@ -92,7 +92,7 @@ var asciidoc = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(function(){
|
jQuery(document).ready(function(){
|
||||||
asciidoc.footnotes();
|
asciidoc.footnotes();
|
||||||
asciidoc.toc();
|
asciidoc.toc();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user