Javascript button event not working on second page.

Javascript button event not working on second page.

FilipNilssonFilipNilsson Posts: 5Questions: 2Answers: 0

Hi!
I have buttons on all the rows that calls javasript event when clicked on.
Everything works perfectly as intented, but when i go to page 2 (im using paginate) the buttons no longer work.

I read something about preInit but im not sure that it is the right thing to do, if it i dont understand how.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    Answer ✓
  • FilipNilssonFilipNilsson Posts: 5Questions: 2Answers: 0

    Ah thanks that fixed it. Will read more thoroughly next time.

  • alderhernandezalderhernandez Posts: 33Questions: 11Answers: 1

    this works for me

    $('#MyTableId tbody').on('click', '.My_Button_id', function () {
    alert("you activate the event");
    });

  • Velmurugan9cs24Velmurugan9cs24 Posts: 1Questions: 0Answers: 0

    Thank alderhernandez

    Your code is Working exactly for me.

This discussion has been closed.