Jquery don't catch event in datatable.

Jquery don't catch event in datatable.

m4dm4rtig4nm4dm4rtig4n Posts: 3Questions: 2Answers: 0
edited January 2023 in Free community support

Hello,

I have generate datatable with 2 actions buttons but when i try to catch buttons event generate by datatable (in server-side), jquery don't catch click() on generate button.

Have you idea why ?

Without server-side mode, it's work :/

Answers

  • m4dm4rtig4nm4dm4rtig4n Posts: 3Questions: 2Answers: 0

    I have just find solution :smile:

    Change :

    $(".datatable_button").click(function () {
    

    by

    $(document.body).on('click', '.datatable_button', function(){
    
  • kthorngrenkthorngren Posts: 21,342Questions: 26Answers: 4,954

    See this example with a similar solution.

    Kevin

Sign In or Register to comment.