Add class based on checked checkbox
You could use a class that would only hold the property for the active element, in our case text-decoration: underline;. Then simply toggle each of the two labels to set on and off this "active" class (here called underline).
So you don't need to know which label is which, both will toggle anyway. Just set one of the two to have the class .underline on page load.

Plain JavaScript



const toggle = () =&gt; document.querySelectorAll('#labels &gt; div')
  .forEach(label =&gt; label.classList.toggle('underline'))

document.querySelector('#houseOrCar').addEventListener('change', toggle);
.underline {
  text-decoration: underline;
}
&lt;input type="checkbox" id="houseOrCar"&gt;

&lt;div id="labels"&gt;
  &lt;div class="underline"&gt;HOUSE&lt;/div&gt;
  &lt;div&gt;CAR&lt;/div&gt;
&lt;/div&gt;




Note I'm using the .forEach method of the nodeList class:


  The forEach() method of the NodeList interface calls the callback given in parameter once for each value pair in the list, in insertion order.




jQuery

And here it is implemented with jQuery, which is shorter but very similar:



const toggle = () =&gt; $('#labels &gt; div')
  .each((i,e) =&gt; $(e).toggleClass('underline'));

$('#houseOrCar').on('change', toggle);
.underline {
  text-decoration: underline;
}
&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;input type="checkbox" id="houseOrCar"&gt;

&lt;div id="labels"&gt;
  &lt;div class="underline"&gt;HOUSE&lt;/div&gt;
  &lt;div&gt;CAR&lt;/div&gt;
&lt;/div&gt;




It's not worth using jQuery for this, personally, I would stick with the plain version. However, if you happen to already use jQuery in your project then go for it!