jQuery in .js file - answered

jQuery in .js file - answered


Hello, can you help me with this: i try to write jQuery script into a .js file. I’ve put "script src=‘https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js’></script"
into the html’s head, after that “script type=‘text/javascript’ src=’./script.js’></script”. And in the .js file i have: $(document).ready(function() {
$(“button”).addClass(“animated shake”);
}); and it’s not working, why?


Have you imported animate.css as well?


no, how do i do that?


If you’re working locally, you can download it from https://daneden.github.io/animate.css/

If you’re on CodePen you can quick-add it in the css settings


thank you! i understand now