jQuerry vs css vs inline styling

**Tell us what’s happening:**Hello, I’m not needing any help on this challenge but I do have a question.

I am curious as to why not just change the background color using css on our style sheet? Or rather, why not just use and inline style to change the color?

Just thought I would share my thoughts.


Your code so far

  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
  .css("background-color", "red");


<!-- 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">
        <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 class="col-xs-6">
        <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>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36.

Link to the challenge:

What JavaScript (and by extension jQuery) does is allow us to dynamically update the page. If you always want your background to be red, then you can do it with CSS. If you want to have everything turn red when you click the Red Alert button, you need to use JavaScript.

Thank you so much for your reply