title: Does the browser re-render the whole page on changes or only the specific elements?
body: <p>Assume I have an element with id <code>#msg</code> and on a certain condition I want to add to it a class in order to apply a style e.g. to make the text appear red.<br>
  I can do <code>$('#msg').addClass(theclass)</code><br>
  My question is how does the browser react? Does it re-render all of the page or does it re-render that specific element?</p>