title: How to get the id of the element clicked using jQuery
body: <pre><code>&lt;div class="main_div"&gt;
      &lt;div id="inner_div"&gt;    
          &lt;span id="d1" class="get_clicked"&gt;click to get id&lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How to get the id of the clicked element? The span which is present inside the inner_div will be having different ids because I will be loading the span from the model(MVC) using jquery ajax. So there will be 'n' number of span. All the span will have unique id. I want to get the id of the span which I click. </p>
  
  <p>How the get the id of the span when clicked? How to do this using jQuery?</p>