title: onclick firing twice and remove "attributes"
body: <p>I have a form. In here dropdown for select rule type.according to rule type in below it displays rule attribute.user must select attributes. If the user wants to remove some attribute from it there is a close button.</p>
  
  <pre><code>&lt;div class="desc" id="{{uuid}}" style="font-weight: 600" &gt;{{name}}'+
  '&lt;button type=\'button\' aria-label=\'Close\' class=\'close\' id=\'{{uuid}}\' onclick=\'$(this).on("click",function() { $(this).parent().remove();alert("lllll"); })\'&gt;X&lt;/button&gt;' +
          '&lt;/div&gt;' 
  </code></pre>
  
  <p>when I used this code, then the user must click the close button twice to remove that selected attribute. how can I stop it firing twice?</p>