title: Delegate function in jquery
body: <p>This function applies to my html array.
  Just a question, how to delegate this for the lines that will dynamically insert with ajax.</p>
  
  <pre><code>    $('#mytable').bootstrapTable({
    contextMenu: '#context-menu',
    onContextMenuItem: function (row, $el) {
        if ($el.data("item") == "add") {
        alert('It work');
        }
        if ($el.data("item") == "edit") {
        alert('It work');
        }
        if ($el.data("item") == "delete") {
        alert('It work');
        }
    }
  });
  </code></pre>
  
  <p>Thanks,</p>