I have this code to set up my dynatable:
$(document).ready(function(){
$('#listingsTable').dynatable({
features: {
paginate: true,
search: true,
recordCount: true
},
readers: {
'price': function(el, record) {
return Number(el.innerHTML);
}
},
writers: {
'price': function(record) {
return record.price.toString();
}
}
});
});
But in this price column, I would like to enclose the table cell values in a span element, so as to display the currency as its title attribute. How can I alter the above functions in readers: and writers: to account for the surrounding span element?
Also I want the price column values (not header) to right-align (understandably), but I can't apply a class or inline style to the table cells, because that gets overwritten by Dynatable (classes get stripped out too) when it's rendered, and all cells have "text-align: left" applied inline.
Si
RépondreSupprimer