How can one "trigger" a recalculation manually?
cyphix333 opened this issue · 3 comments
cyphix333 commented
Is there a way to trigger the recalculation of all the fields of the form? Say if I want to bind it so that it recalculates on users typing (with a second delay for example); I'm just concerned about users seeing the wrong values if they go right for the submit button right after entering data and the field never losing focus forcing a recalculation.
Thanks!
ikhsan017 commented
You can change the event that trigger the calculation, by default is blur, but you can change it to keyup or keypress for more realtime response
$('#form').calx({autoCalculateTrigger: 'keyup'});
cyphix333 commented
Ahh thanks for that :)
cyphix333 commented
Just found out if you want to manually trigger a calculation however you can do...
$(selector).calx('calculate');