className.indexOf replaced with classList.contains

This commit is contained in:
Vadim Makeev 2012-02-29 01:41:53 +01:00
parent 85f48e12f0
commit 4566fc394f
1 changed files with 1 additions and 1 deletions

View File

@ -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;