24 ways to impress your friends

Jump to menu

Vote up?

Jack Hardcastle

If you change line 29 to

if ((parentElementClass == null)||(currentParent.className.indexOf(parentElementClass))) {

then you can do something like this

ul class="videos striped"

and it will match. This lets you apply more than one class to your parent element.