All jQuery lessons and functions work ok in the fCC editor, but I’d like to have a copy of working code offline on my laptop to review later. Since it is not mentioned how jQuery and Animate.css have been imported “under the hood”, in a local html file on my laptop I included them in this way:
Basically all functions and classes that achieve a static result like changing color/properties etc work ok on my laptop (I tried Chrome, Chromium, Mozilla browsers). But adding classes “animated bounce/shake/hindge” do not animate.
I also tried to include jQuery from local path. Maybe Animate.css has not been included correctly? How can I make the “animated” classes work locally on my laptop?
opening their documentation I see a warning that says
Hey! It seems that you have animations disabled on your OS, turning Animate.css off.
Animate.css supports the prefers-reduced-motion CSS media feature. You can read more about it here.
this could be related on why it’s not working
the other reason could be the version, version 4 that you have imported requires different class names than what the freeCodeCamp curriculum uses as the curriculum uses a previous version
you can try importing the compact version, which doesn’t use the prefix in the classes, like explained here:
or consult the documentation for the proper class names
Your setup looks good, but try adding ‘animate__’ as a prefix to the class names. For example, use ‘animate__bounce’ instead of ‘bounce’. Also, ensure you add both ‘animate__animated’ and the animation class when triggering animations. Example: $(‘#element’).addClass(‘animate__animated animate__bounce’);.