Open EmilyChews opened 5 years ago
Hi @EmilyChews, I can't replicate this one. I copied your code and I'm not seeing an error when my page lacks the appropriate CSS class in the HTML.
Did you manage to fix this? Or is there a code sample on codepen or similar I could look at?
Hi,
I'm using this wonderful library on a couple of sites and I've noticed it's throws an error in the console if certain pages (i.e. a 404 page) don't have the appropriate CSS class in the HTML to use in the rellax object.
Normally I would wrap the function/object in an
if
statement so it it would only trigger if a certain CSS class is present.This doesn't seem to be working though?
Any help would be amazing.
The solution I'm trying is as follows: