Targeting by Class

Hello everyone,

Both at ‘targeting by class’ and ‘targeting by id’ I feel like I am having the same problem…

targeting by class
What I enter in the main.js document is exactly the same as the code that codeacademy fills out for you after failing a couple of times, yet the instructions only turn red instead of green. Did I forget something?

My input:

$(document).ready(() => {
  $('.product-photo').show()
});

targeting by id
This time I can manage to get the first of the instructions green instead of red, unlike targeting by class where I can’t even get the first one green, yet the second one once again remains red even though I enter exactly the same input as codeacademy does. Am I forgetting something in the css or html file or something?

Thank you,
Marie

Even when you get the correct code, copy the correct code, reset the exercise then paste the correct code, its not working

I will report the issue

2 Likes

Please post a link to the exercise page where this problem has surfaced. Thanks.

1 Like

i assume the following exercises:

https://www.codecademy.com/courses/learn-jquery-introduction/lessons/jquery-setup/exercises/targeting-by-class?action=lesson_resume&course_redirect=learn-jquery

https://www.codecademy.com/courses/learn-jquery-introduction/lessons/jquery-setup/exercises/targeting-by-id?action=lesson_resume&course_redirect=learn-jquery

given that is the forum section they are posted under, and the name of the exercises match

2 Likes

Hello,

I can confirm that it this is the one:

https://www.codecademy.com/courses/learn-jquery-introduction/lessons/jquery-setup/exercises/targeting-by-class?action=lesson_resume&course_redirect=learn-jquery

I was going through the jQuery course this morning and found the same issue. I submitted a bug report after finding it.

1 Like