sum() result usable anywhere in html?
sum() result usable anywhere in html?
![thowi](https://secure.gravatar.com/avatar/75fb33683635396290f76abcf480d9cd/?default=https%3A%2F%2Fvanillicon.com%2F75fb33683635396290f76abcf480d9cd_200.png&rating=g&size=120)
Hi there,
again, a noobie question, sorry for that
I am successfully using the sum() function which now puts the result into the table footer with the following code:
drawCallback: function () {
var api = this.api();
$( api.table().footer() ).html(
Math.round(api.column(3).data().sum() * 100)/100 + ' €'
);
}
But I'd like to use that result somewhere else in this .php file, right above the
<
table>. How can I do that?
Thank you so much!
This discussion has been closed.
Answers
Got it by myself, replace line 3 to something like![:D :D](https://datatables.net/forums/resources/emoji/lol.png)
$( '#id' ).html(
and there we are