Answer the question
In order to leave comments, you need to log in
classList not working in IE11, what can be done?
In other browsers everything works, in IE11 it reaches the line
and issues:
Failed to get the "classList" property of a link whose value is undefined or NULL
, please help me how to deal with it. In all other browsers everything works fine. cards[i].classList.toggle('selected');
Answer the question
In order to leave comments, you need to log in
Back to top head
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Here you need to look up what is inherited from what. Does cards[i] have prototypes?
In normal browsers, classList appears on Element. At microsoft splint - in HTMLElement. Therefore, an object that inherits from Element does not have a classList. For example, SVGSVGElement.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question