className.indexOf replaced with classList.contains
This commit is contained in:
parent
85f48e12f0
commit
4566fc394f
|
@ -97,7 +97,7 @@
|
||||||
function getContainingSlideId(el) {
|
function getContainingSlideId(el) {
|
||||||
var node = el;
|
var node = el;
|
||||||
while ('BODY' !== node.nodeName && 'HTML' !== node.nodeName) {
|
while ('BODY' !== node.nodeName && 'HTML' !== node.nodeName) {
|
||||||
if (-1 !== node.className.indexOf('slide')) {
|
if (node.classList.contains('slide')) {
|
||||||
return node.id;
|
return node.id;
|
||||||
} else {
|
} else {
|
||||||
node = node.parentNode;
|
node = node.parentNode;
|
||||||
|
|
Loading…
Reference in New Issue