mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
FIX: use prop("tagName") instead of attr("tagName")
This commit is contained in:
parent
027b63ea0b
commit
2968e2947e
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
$('#content-column h1[id], #content-column h2[id], #content-column h3[id], #content-column h4[id]').each(function(i) {
|
$('#content-column h1[id], #content-column h2[id], #content-column h3[id], #content-column h4[id]').each(function(i) {
|
||||||
var current = $(this);
|
var current = $(this);
|
||||||
var tagName = current.attr("tagName");
|
var tagName = current.prop("tagName");
|
||||||
if(typeof tagName == "String") tagName = tagName.toLowerCase();
|
if(typeof tagName == "String") tagName = tagName.toLowerCase();
|
||||||
|
|
||||||
toc += '<li class="' + tagName + '"><a id="link' + i + '" href="'+ pageURL +'#' + $(this).attr('id') + '" title="' + current.html() + '">' + current.html() + '</a></li>';
|
toc += '<li class="' + tagName + '"><a id="link' + i + '" href="'+ pageURL +'#' + $(this).attr('id') + '" title="' + current.html() + '">' + current.html() + '</a></li>';
|
||||||
|
Loading…
Reference in New Issue
Block a user