The second one has been deprecated, but the first method, the one we use in the course, shows no sign of being deprecated anywhere that I’ve seen.
And secondly, Codecademy’s jQuery course does use an older jQuery version and the course is not being actively maintained any longer, so there is a possibility of outdated techniques or code being used in this course.