where to put .button() call
where to put .button() call
grahampcharles
Posts: 20Questions: 1Answers: 0
When using a jQueryUI button in a datatable, it seems that either of these works:
[code]
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
$(nRow).find(".the-button").button({ icons: { primary: "ui-icon-cart"} });
return nRow;
}
[/code]
or
[code]
"fnDrawCallback": function( oSettings ) {
$(".the-button").button({ icons: { primary: "ui-icon-cart"} });
}
[/code]
Is one preferred to the other? Am I going to run into problems with these approaches?
Thanks,
g.
[code]
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
$(nRow).find(".the-button").button({ icons: { primary: "ui-icon-cart"} });
return nRow;
}
[/code]
or
[code]
"fnDrawCallback": function( oSettings ) {
$(".the-button").button({ icons: { primary: "ui-icon-cart"} });
}
[/code]
Is one preferred to the other? Am I going to run into problems with these approaches?
Thanks,
g.
This discussion has been closed.
Replies
Allan