Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82109

how i can change or insert class from json response?

$
0
0
i have a json response like this:
{"sEcho": 1, "iTotalRecords": 1371, "iTotalDisplayRecords": 1, "aaData": [
["<a class=ajax href=view.asp?id_view=1186>Transamerica Flat Barra</a> ","","","","","","0","0","0%","<img src=attach.png width=15px height=15px>"]] }

if i put directly in html:
<a href="view.asp" class="ajax">blablabla</a> 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('<a class="ajax" href="view.asp">'+aData[4]+'</a>').attr("class","ajax")
.children('a.ajax')
}
return nRow;
} ,


any helps?


Thanks

Viewing all articles
Browse latest Browse all 82109

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>