question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Beta - Waypoint: Target the Parent of an Element Using jQuery

See original GitHub issue

Challenge http://beta.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.

The description is wrong in the validations:

Your "target1" element should have red text.

should be:

Your "target1" element should have red background.

This code is validated correctly:

<script>
  $(document).ready(function() {
    $('#target1').parent().css('background-color','red');
  });
</script>
screen shot 2015-08-05 at 14 16 31

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

1reaction
ChrisPrietocommented, Dec 4, 2015

i found this is the correct code.

$(“#target1”).parent().css(“background-color”,“red”);

0reactions
squat-that-flycommented, Feb 4, 2017

the right answer is $(“#left-well”).css(“background-color”,“red”); $(‘#target1’).parent().css(‘background-color’,‘red’);

Read more comments on GitHub >

github_iconTop Results From Across the Web

Waypoint: Target the Parent of an Element Using jQuery #1554
Beta - Waypoint: Target the Parent of an Element Using jQuery · Issue #1554 · freeCodeCamp/freeCodeCamp · GitHub.
Read more >
Target the Parent of an Element Using jQuery - Guide
In your code you are targeting the PARENT of the div with the ID left-well. Thus, you are targeting the div with the...
Read more >
.parent() | jQuery API Documentation
Given a jQuery object that represents a set of DOM elements, the parent() method traverses to the immediate parent of each of these...
Read more >
Directions | API - Mapbox docs
The Mapbox Directions API calculates optimal routes and produces turn-by-turn ... Retrieve directions between waypoints and see the results on a map.
Read more >
www.annapolisoa.org/wp-content/plugins/microthemer...
7.0.5.4 (November 25th, 2021) = # Change * When you select an element, and an existing selector targets it but in a different...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found