how i can change or insert class from json response? (SOLVED)
how i can change or insert class from json response? (SOLVED)
![davisvasconcellos](https://secure.gravatar.com/avatar/180b0bd2a51361f4aaf0d97f856d1cd1/?default=https%3A%2F%2Fvanillicon.com%2F180b0bd2a51361f4aaf0d97f856d1cd1_200.png&rating=g&size=120)
i have a json response like this:
{"sEcho": 1, "iTotalRecords": 1371, "iTotalDisplayRecords": 1, "aaData": [
["Transamerica Flat Barra ","","","","","","0","0","0%",""]] }
if i put directly in html:
blablabla modal window apears and. works fine.
but not work if i put in json reponse . :(
i test this without sucess:
"fnRowCallback": function( nRow, aData ) {
if ( aData[4]){
$('td:eq(4)', nRow)
.html(''+aData[4]+'').attr("class","ajax")
.children('a.ajax')
}
return nRow;
} ,
any helps?
Thanks
i found my answer on:
http://datatables.net/forums/discussion/1628/x&page=1#Comment_19824
thanks all
{"sEcho": 1, "iTotalRecords": 1371, "iTotalDisplayRecords": 1, "aaData": [
["Transamerica Flat Barra ","","","","","","0","0","0%",""]] }
if i put directly in html:
blablabla modal window apears and. works fine.
but not work if i put in json reponse . :(
i test this without sucess:
"fnRowCallback": function( nRow, aData ) {
if ( aData[4]){
$('td:eq(4)', nRow)
.html(''+aData[4]+'').attr("class","ajax")
.children('a.ajax')
}
return nRow;
} ,
any helps?
Thanks
i found my answer on:
http://datatables.net/forums/discussion/1628/x&page=1#Comment_19824
thanks all
This discussion has been closed.