title: Select only specific li clicked
body: <p>I want to select the specific <code>li</code> clicked using jQuery in my project. When I click on one <code>li</code>, it selects all the <code>li's</code>. This is my fiddle. I am just a beginner. I have tried using parent(), but it is not working.
  <a href="https://jsfiddle.net/timiosaze/68j9tnbk/6/" rel="nofollow noreferrer">JS FIDDLE</a></p>
  
  <p>This is my HTML:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var clicks = 0;
  $("li").on("click", function () {
    clicks++;
    $('.top-right').html(clicks);
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.list li {
    list-style-type: none;
    display: inline-block;
    background-color: white;
    margin-right: 7px;
  }
  
  .list {
    margin: 5px;
  }
  
  .list li a {
    text-decoration: none;
    color: black;
    padding: 2px;
  }
  
  .list li a:hover,
  .list li a:hover {
    color: black;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;title&gt;Exam&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div class="list"&gt;
      &lt;ul&gt;
        &lt;li&gt;
          &lt;a href="#"&gt;NAME
            &lt;span class="line"&gt;&lt;/span&gt; AWONUSI OLAJIDE&lt;/a&gt;
          &lt;span class="top-right"&gt;&lt;/span&gt;
        &lt;/li&gt;
        &lt;li&gt;
          &lt;a href="#"&gt;NAME
            &lt;span class="line"&gt;&lt;/span&gt; ADEGBULUGBE TIMILEHIN&lt;/a&gt;
          &lt;span class="top-right"&gt;&lt;/span&gt;
        &lt;/li&gt;
        &lt;li&gt;
          &lt;a href="#"&gt;NAME
            &lt;span class="line"&gt;&lt;/span&gt; OLUOLU ADEDEJI&lt;/a&gt;
          &lt;span class="top-right"&gt;9999&lt;/span&gt;
        &lt;/li&gt;
        &lt;li&gt;
          &lt;a href="#"&gt;NAME
            &lt;span class="line"&gt;&lt;/span&gt; OYAJE JOSHUA&lt;/a&gt;
          &lt;span class="top-right"&gt;9999&lt;/span&gt;
        &lt;/li&gt;
        &lt;li&gt;
          &lt;a href="#"&gt;NAME
            &lt;span class="line"&gt;&lt;/span&gt; ALABI OJO ADE&lt;/a&gt;
          &lt;span class="top-right"&gt;9999&lt;/span&gt;
        &lt;/li&gt;
        &lt;li&gt;
          &lt;a href="#"&gt;NAME
            &lt;span class="line"&gt;&lt;/span&gt; AKILO AWANI&lt;/a&gt;
          &lt;span class="top-right"&gt;9999&lt;/span&gt;
        &lt;/li&gt;
        &lt;li&gt;
          &lt;a href="#"&gt;NAME
            &lt;span class="line"&gt;&lt;/span&gt; AYUBA DEJIMARK&lt;/a&gt;
          &lt;span class="top-right"&gt;9999&lt;/span&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
    &lt;script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
      crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>