title: Pass this(a button html element) to "onclick" function
body: <p>I create dynamically a new row of a table using jQuery:</p>
  <pre><code>    addRowToTable() {
          $('.table &gt; tbody:last-child').append(
              '&lt;tr&gt;' +
              '&lt;td name=&quot;name1&quot; contenteditable=&quot;true&quot;&gt;&lt;/td&gt;' +
              '&lt;td name=&quot;name2&quot; contenteditable=&quot;true&quot;&gt;&lt;/td&gt;' +
              '&lt;td name=&quot;name3&quot; contenteditable=&quot;true&quot;&gt;&lt;/td&gt;' +
              '&lt;td name=&quot;name4&quot; contenteditable=&quot;true&quot;&gt;&lt;/td&gt;' +
              '&lt;td id=&quot;save&quot;&gt;' +
              '&lt;button&gt;save&lt;/button&gt;' +
              '&lt;/td&gt;' +
              '&lt;td id=&quot;delete-row&quot;&gt;' +
              '&lt;button onclick=&quot;deleteRowFromTable($(this))&quot;&gt;delete&lt;/button&gt;' +
              '&lt;/td&gt;' +
              '&lt;/tr&gt;'
          );
      }
  
  </code></pre>
  <p>Here is my <code>deleteRowFromTable(deleteRowButton)</code>:</p>
  <pre><code>deleteRowFromTable(deleteRowButton) {
      $(deleteRowButton).closest('tr').remove();
  }
  </code></pre>
  <p>,it's in the same class as the <code>addRowToTable</code> method.
  And i'd like to pass a button in the <code>onclick</code> attribute.
  I tried both <code>onclick=&quot;deleteRowFromTable($(this))&quot;</code> and <code>onclick=&quot;deleteRowFromTable(this)&quot;</code> - none of them works.
  Any ideas how to make this work?</p>