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.

Incorrect target name causes issues with code editor and goals

See original GitHub issue

Challenge Name

Target a specific child of an element using jQuery

Issue Description

If the target is incorrectly listed as (“target-nth-child(2)”) as opposed to the correct (“target:nth-child(2)”) then when the run tests button is clicked the code editor section will begin flash black/white and then settle on white. If you attempt to reload the page the editor will appear as it should however it will not display the goals until the correct target name is entered and you hit the run tests button.

Browser Information

  • User Agent String: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
  • Browser Name, Version: Microsoft Edge, 25.10586.0.0
  • Operating System: Windows 10 Pro
  • Mobile, Desktop, or Tablet: Desktop

Your Code

<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");
    $("#left-well").children().css("color", "green");
    $(".target-nth-child(2)").addClass("animated bounce");

  });
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <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">
      <h4>#right-well</h4>
      <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>

Screenshot

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Bounceycommented, Jul 4, 2016

@erictleung Would be fixed to a point with this PR #9490

There is a bigger bug at play, but we haven’t found it yet

0reactions
erictleungcommented, Jul 4, 2016

When I input your code and run tests, the tests disappear for me. I’m running Chrome on Mac OS X Yosemite.

image

Not sure how we would tackle this. The code is incorrect and it’s creating unintended effects in the emulator.

cc/ @FreeCodeCamp/issue-moderators

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting .NET Framework Targeting Errors - MSBuild
NET Framework applications, open Solution Explorer, choose Show All Files, and then edit the app.config file in the XML editor of Visual Studio....
Read more >
Fix common Google Ads Editor errors
Typically this error is caused by issues with demographic or audience targeting. Remove demographic attributes such as age group or gender. Change your...
Read more >
Error Messages (GNU make)
Error messages are all either prefixed with the name of the program (usually ' make '), or, if the error is found in...
Read more >
AD Replication: "The target principal name is incorrect"
It was always the same domain controller in use for the replication. The reason for the message was, that a VPN connection between...
Read more >
Troubleshooting Issues in Ads Manager | Meta Business Help ...
Find answers and learn how to troubleshoot issues in Ads Manager. Check out our help page for more information.
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