jQuery in .js file - answered

jQuery in .js file - answered
0

#1

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?


#2

Have you imported animate.css as well?


#3

no, how do i do that?


#4

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


#5

thank you! i understand now