title: How to add class on click with jQuery to list item?
body: <p>I have a list item like </p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;&lt;img id="1" src="" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img id="2" src="" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img id="3" src="" /&gt;&lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;input type="button" &gt;
  </code></pre>
  
  <p>I would like on click of any of the list to add class and remove from others with jQuery. Basically to make only one item selected at the time.</p>
  
  <p>and on button click to show id of selected list item</p>