title: Adding class to clicked element
body: <p>I'm trying to add a class to a clicked element. There are multiple elements with unique IDs so I "don't know" what the ID of the element is.</p>
  
  <p>Can I use a modified version of the below code to achieve this?</p>
  
  <p>Jquery:</p>
  
  <pre><code>$(document).ready(function () {
      $(this).on('click', function () {
          $(this).addClass('widget-selected');
      });
  });
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>A markup can be like this:</p>
  
  <pre><code>&lt;h1 id="textHolder1" contenteditable="true"&gt;Text to edit&lt;/h1&gt;
  </code></pre>