target.classList to target.className.split(' ')

In order to support IE8 and IE9 the classList should be replaced with className.