Click event only fire on first page...
Click event only fire on first page...
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]
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]
This discussion has been closed.
Replies
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
Problem solved.