title: Select 'this' object of clicked element only (not the other elements within the same class)
body: <p>I am trying to change buttons text on click (using Bootstrap 4). I have a problem with using the correct syntax.</p>
  
  <p>My html:</p>
  
  <pre><code>&lt;div class="btn-group"&gt;
    &lt;button type="button" class="btn btn-outline-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="dropdownMenuButton2"&gt;
    Option 1                  
    &lt;/button&gt;
    &lt;div class="dropdown-menu" aria-labelledby="dropdownMenuButton2"&gt;
      &lt;a class="dropdown-item" href="#"&gt;Option 2&lt;/a&gt;
      &lt;a class="dropdown-item" href="#"&gt;Option 3&lt;/a&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="btn-group"&gt;
    &lt;button type="button" class="btn btn-outline-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="dropdownMenuButton2"&gt;
    Type 1                  
    &lt;/button&gt;
    &lt;div class="dropdown-menu" aria-labelledby="dropdownMenuButton3"&gt;
      &lt;a class="dropdown-item" href="#"&gt;Type 2&lt;/a&gt;
      &lt;a class="dropdown-item" href="#"&gt;Type 3&lt;/a&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and JS:</p>
  
  <pre><code>$(".dropdown-menu a").click(function () {
  
    $(".btn:first-child").html($(this).text());
  
  });
  </code></pre>
  
  <p>To rephrase - when I click on one button and change its value, the other one changes too...</p>
  
  <p>So I would like to change this value of the only clicked.</p>