JSFiddle - React, Tailwind, and code Playground
HTML
<div class="tier">
<p class="title">Tier 1</p>
<p>This is the Tier 1 item</p>
</div>
<div class="tier">
<p class="title">Tier 2</p>
<p>This is the Tier 2 item</p>
<p class="delete">Delete Me</p>
</div>
<div class="tier">
<p class="title">Tier 3</p>
<p>This is the Tier 3 item</p>
<p class="delete">Delete Me</p>
</div>
JavaScript
$(function() {
$(".delete").bind("click", function() {
$(this).parent().remove();
$(".tier").each( function(index) {
var tierIndex = index+1;
$(this).find(".title").text("Tier " + tierIndex);
});
});
});