background-check
background-check copied to clipboard
Uncaught TypeError: className.replace is not a function
I have tried with different target classes and the error keeps occurring. On init I get "Uncaught TypeError: className.replace is not a function". My target class is on a
Any idea why? Thanks!
I struggled with this error too, and isolated it to the particular element attached to the target class selector. In my case it would be 'svg'. It would give me this error if I use it on that element. So I just wrapped it in and put the targetClass there. Make sure you put some content in there if svg (like an nbsp for example), so it would think it's not an empty container.
Or you can add it to the wrapping parent element, then just style it accordingly:
parent.targetClass > targetElement background-dark: #000
Hope that helps.