In LF Forms we have a field that needs to calculate the % change between two salaries (current and new). We have tried the below javascript/css combo but it's not working.
CSS:
Current Sal: num1
New Sal: num2
%change: numtotal
JavaScript:
$(document).ready(function () {
$('.num1').on('blur change', '.num1 input', numtotal);
$('.num2').on('blur change', '.num2 input', numtotal);
function numtotal() {
var num1 = num1.value;
var num2 = num2.value;
return ((num2 - num1) / num1 * 100 + "%");
}