Lines Matching refs:elem

39 		this._enumSidebarLinks(function(elem) {
41 if (!isFound && elem.getAttribute("data-wiki-id") === this._id)
43 this._embedToc(elem, this._toc);
45 this._targetSidebarItem = elem;
49 this._pages.push(elem.href);
61 nodes.forEach(function(elem) {
62 elem.href = this._startPage;
99 var elem = document.querySelector(hash);
100 if (elem)
102 style = elem.style.display;
103 elem.style.display = "none";
106 elem.style.display = style;
141 * @param {HTMLElement} elem A TOC item element.
143 ReadtheDokus.prototype.toggleTocMenu = function(elem)
146 var invisible = elem.parentNode.querySelector(".toc").classList.contains("invisible");
149 this.expandTocMenu(elem);
153 this.collapseTocMenu(elem);
163 * @param {HTMLElement} elem A toc item element.
165 ReadtheDokus.prototype.expandTocMenu = function(elem)
168 if (elem && elem.classList.contains("expandable"))
170 elem.parentNode.querySelector(".toc").classList.remove("invisible");
172 var i = elem.children[0].children[0].children[0];
176 var img = elem.children[0].children[0].children[1];
189 * @param {HTMLElement} elem A toc item element.
191 ReadtheDokus.prototype.expandParentTocMenu = function(elem)
194 var p = elem.parentNode;
220 * @param {HTMLElement} elem A toc item element.
222 ReadtheDokus.prototype.collapseTocMenu = function(elem)
225 if (elem && elem.classList.contains("expandable"))
227 elem.parentNode.querySelector(".toc").classList.add("invisible");
229 var i = elem.children[0].children[0].children[0];
233 var img = elem.children[0].children[0].children[1];
315 nodes.forEach(function(elem) {
316 callback(elem);
411 nodes.forEach(function(elem) {
412 elem.addEventListener("click", function() {
414 let p = this._getParent(elem, "level2");
419 nodes2.forEach(function(elem) {
420 elem.classList.remove("current");
428 elem.classList.add("current");
429 elem.scrollIntoView(true);
433 this.expandTocMenu(elem);
460 nodes.forEach(function(elem) {
461 if (elem.parentNode.querySelector(".toc"))
463 elem.classList.add("expandable");
466 elem.children[0].insertAdjacentHTML("afterbegin", '<div class="btn-expand"><i class="far fa-minus-square"></i><img class="minus" src="' + DOKU_BASE + 'lib/images/minus.gif" alt="−"></div>');
469 elem.children[0].children[0].addEventListener("click", function(e) {
470 this.toggleTocMenu(elem);
477 if (!elem.parentNode.classList.contains("level1"))
479 this.collapseTocMenu(elem);
484 elem.addEventListener("click", function() {
485 elem.scrollIntoView(true);
501 nodes.forEach(function(elem){
502 elem.addEventListener("click", function(e) {
503 var href = elem.getAttribute("href");
507 if (href.substring(0,1) == "#" || elem.getAttribute("title") == document.body.getAttribute("data-id"))
525 * @param {HTMLElement} elem An HTML element.
556 * @param {HTMLElement} elem An HTML element.
559 ReadtheDokus.prototype._getParent = function(elem, level)
562 let current = elem.parentNode;