trigger on total

Add hook on js for total