I am using datatables to show JSON data in fancy cards layout. I am using DT's render method to churn out card's HTML code:
"render": function ( data, type, row, meta ) {
var formattedHTMLRow = "<div title = '" + row.title + "'>"+ row.service_name + "<p>" + row.category_name + "</p>" + "</div>";
return serviceNameColumn;
}
The formattedHTMLRow is a watered down version of actual HTML code required to create card view. I dont want to write a lot of HTML code in Javascript.
Ideally, I want to load a *.html file with HTML template and get render method to use it. How do I do that?
rendermethod.