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.

Change Text Inside an Element Using jQuery

See original GitHub issue

Issue Description

I can seem to get freecode camp to work with me on this issue, its annoying as hell. Theyre so vague its disgusting. Ive tried 10 different ways to “Emphasize the text in your target4 button by adding HTML tags.” and nothing works and all the “solutions” i find on the internet dont work either. Maybe free code camp is broken. who knows

Browser Information

  • Browser Name, Version:
  • Operating System:
  • Mobile, Desktop, or Tablet:

Your Code

<script> $(document).ready(function() { $("#target1").css("color", "red");$("#target4").html("<i>#target4</i>")
 }); </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>
</div>

Screenshot

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Jul 5, 2017

i tried the em tags several times a thousand different ways

1reaction
manmeet17commented, Jul 4, 2017

Just change the i tag to em tag , the challenge says that you need to emphasize the text I know that i tag and em tag are supposed to give the same end result, but the difference is i has the purpose of presenting something in italicised style. em has the purpose of giving emphasis to the content. HTML is all about the semantics

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change Text Inside an Element Using jQuery - Guide
Change Text Inside an Element Using jQuery Solutions Solution 1 (Click to Show/Hide) <script> $(document).ready(function() ...
Read more >
Change Text Inside an Element Using jQuery - Free Code Camp
In this jQuery tutorial we change text inside an element using jQuery. This video constitutes one part of many where I cover the ......
Read more >
Replace only text inside a div using jquery - Stack Overflow
Replace only text inside a div using jquery · It might be helpful to make a fiddle. – Inkbug. Aug 8, 2012 at...
Read more >
.text() | jQuery API Documentation
A function returning the text content to set. Receives the index position of the element in the set and the old text value...
Read more >
Change Text Inside an Element Using jQuery - YouTube
Certification: Front End Development LibraryCourse: jQueryLesson: Change Text Inside an Element Using jQueryfreeCodeCamp tutorialIn this ...
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