 <p>Use a delegated event handler :</p> <pre><code>$('#table').on('click', '.pay-btn', function(e) { </code></pre> <p>dataTables inject and remove table rows to the DOM in order to show pages. Thats why your event handler not is working except from page #1.</p> <p><strong>NB</strong>: Dont know what your <code>&lt;table&gt;</code> <code>id</code> is - replace <code>#table</code> with your <code>id</code>.</p>