Outdated jQuery being taught?

Hey,

I noticed that Codecademy teaches the use of the ‘.toggle’ event method.

My question; Why?

According to jQuery’s changelog in Wikipedia and on their website, this was deprecated back in Aug 2012.

Thoughts everyone?

Have I missed something here/Am I wrong?

Cheers,

Jamie

1 Like

I never really noticed.

Is there any alternative aside from the toggleClick plugin?
(If you’re not aware of it, you can find the snipper here)

Hi @wannabecodingguru,

Firstly, I don’t think that the toggle() method is deprecated. jQuery (confusingly) had two toggle() methods:

  1. https://api.jquery.com/toggle/
  2. https://api.jquery.com/toggle-event/

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.

2 Likes

This is where I was getting confused; Thanks!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.