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.

Cant' understand how we are going to target 2nd child of 'well' if we have not mentioned element 'well' anywhere in the query..

See original GitHub issue

Challenge Target a Specific Child of an Element Using jQuery has an issue. User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code: html

<script> $(document).ready(function() { $("#target1").css("color", "red"); $("#target1").prop("disabled", true); $("#target4").remove(); $("#target2").appendTo("#right-well"); $("#target5").clone().appendTo("#left-well"); $("#target1").parent().css("background-color", "red"); $("#right-well").children().css("color", "orange"); -------> $(".target:nth-child(2)").addClass("animated bounce"); }); </script> <div class="container-fluid">

jQuery Playground

<div class="row"> <div class="col-xs-6">

#left-well

<div class="well" id="left-well"> <button class="btn btn-default target" id="target1">#target1</button> <button class="btn btn-default target" id="target2">#target2</button> <button class="btn btn-default target" id="target3">#target3</button> </div> </div> <div class="col-xs-6">

#right-well

<div class="well" id="right-well"> <button class="btn btn-default target" id="target4">#target4</button> <button class="btn btn-default target" id="target5">#target5</button> <button class="btn btn-default target" id="target6">#target6</button> </div> </div> </div> </div>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jonathanihmcommented, Jun 27, 2017

I see what is being said now and I see the ambiguity. I agree there needs to be a wording change.

1reaction
jonathanihmcommented, Jun 23, 2017

I am having trouble seeing the wording that you are. Could you copy and paste the actual wording on the challenge and maybe we can change it? What I see is this:

Make the second child in each of your well elements bounce. You must target the children of element with the target class.

Read more comments on GitHub >

github_iconTop Results From Across the Web

:nth-of-type | CSS-Tricks - CSS-Tricks
The :nth-of-type selector allows you select one or more elements based on their source order, according to a formula. It is defined in...
Read more >
nth-child css selector not working correctly if we had <br> tag ...
The queries work as expected. When you run .div1>span:nth-child(2) you are requesting for a span element that is the second child of its ......
Read more >
Using :has() as a CSS Parent Selector and much more - WebKit
While the second selects an element only if the img is a direct child of the a . Both can be useful; they...
Read more >
nth-child() - CSS: Cascading Style Sheets - MDN Web Docs
:nth-child() takes a single argument that describes a pattern for matching element indices in a list of siblings. Element indices are 1-based. : ......
Read more >
Selecting content on a web page with CSS selectors
Use the CSS Selector syntax to select elements on this web page ... When we use CSS Selectors, we do not need to...
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