Need to hide property of jQuery Datatable using local variable -


i using jquery datatables display data, using html5, want make code generic parameters can passed in html.

my datatable call looks

$('.search-result').datatable({
"bserverside": serverside,
"sajaxsource": url,
"aocolumndefs": msortingstring,
"fncreatedrow": function (nrow, adata, idataindex){
$(nrow).attr('data-title', "test");
} });

what want accomplish control fncreatedrow parameter addition local variable like

if (showrow){ "fncreatedrow": function (nrow, adata, idataindex){
$(nrow).attr('data-title', "abc");
} }

i have tried above code doesn't work, way trying do?

you can try this:

"fncreatedrow": function(nrow, adata, idataindex) {     if (showrow) {         $(nrow).attr('data-title', "abc");     } } 

i don't think possible control parameter addition javascript/jquery code loaded once , cannot load parameter, if condition true, without reloading page.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -