Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Your left-well element should have a red background - it does but i can't pass #1934

Closed
MelissaManning opened this issue Aug 17, 2015 · 3 comments · May be fixed by jcentino/freecodecamp#46
Closed

Comments

@MelissaManning
Copy link

Challenge http://www.freecodecamp.com/challenges/waypoint-target-the-parent-of-an-element-using-jquery has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

image

@jmauzy
Copy link

jmauzy commented Aug 18, 2015

This is not a bug.

In your code you are targeting the PARENT of the div with the ID left-well. Thus, you are targeting the div with the class col-xs-6.

Since you're targeting the left-well ID using the parent() selector, you'd want to target one of the children within that ID.

For example, the code:

$("#target1").parent().css("background-color", "red")

should (and does) work. Hope this helps.

@mohmmadasim
Copy link

thanks for the help

@rupeshshitole
Copy link

Correct Answer is,

$("#left-well").css("background-color","red");
$('#target1').parent().css('background-color','red');

@freeCodeCamp freeCodeCamp locked as resolved and limited conversation to collaborators Oct 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants