Click event only fire on first page...

Click event only fire on first page...

mylokmylok Posts: 8Questions: 0Answers: 0
edited October 2009 in General
I have table each row contain a button, when click button open another window.
But the click event only fire on first page, can you help me?
code as below:
[code]
$("#mytable>tr").each(function() {
var number = $("td:eq(2)", this).text();
var desc = $("td:eq(3)", this).text();
var hs = $("td:eq(4)", this).text();
$(":button", this).click(function() {
OpenAddNew(number, desc, hs);
return false;
});
});
[/code]

Replies

  • allanallan Posts: 61,716Questions: 1Answers: 10,108 Site admin
    Hi mylok,

    Please refer to the following two examples:
    http://datatables.net/examples/advanced_init/events_pre_init.html
    http://datatables.net/examples/advanced_init/events_post_init.html

    And some of the other posts on this topic:
    http://datatables.net/forums/comments.php?DiscussionID=540
    http://datatables.net/forums/comments.php?DiscussionID=452 (among others)

    Regards,
    Allan
  • mylokmylok Posts: 8Questions: 0Answers: 0
    Thanks for the quick response!
    Problem solved.
This discussion has been closed.