JSFiddle - React, Tailwind, and code Playground

by sendmetamil

HTML

<!DOCTYPE html>
<html>
<head>
  <style>
  p { background:yellow; font-weight:bold; cursor:pointer; 
      padding:5px; }
  p.over { background: #ccc; }
  span { color:red; }
  </style>
  <script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
    <div id="aDiv123">
  <p id="abcd1234" class="abcd123">Click me!</p>
    </div>
  <span></span>
<script>
    $("p").live("click", function(){
      $(this).after("<p id='abcd123' class='abcd2323'>Another paragraph!</p>");
    var number = this.id.match(/^abcd(\d+)$/)[1];
    var iD = this.id;
    alert(number);
    alert(iD);
    var div = "#"+"aDiv"+number;
    alert(div)
    $(div).remove();
    });
</script>

</body>
</html>