title: Should I check if a class exists before I attempt to remove it with JQuery
body: <p>This is what I have:</p>
  
  <pre><code>function myFunction() {
  
      $("body").removeClass("toggled");
  }
  $(window).on('resize',myFunction);
  </code></pre>
  
  <p>It seems to work. But... I don't know... It seems a bit short? :P</p>
  
  <p>Are there any performance penalties by doing it like this? I can imagine JQuery secretly throwing errors every time this class couldn't be found (but I might be talking nonsense).</p>
  
  <p>A little clarification would be helpful :)</p>
  
  <p>Best regards,</p>
  
  <p>Michael</p>