Your syntax is incorrect.
After writing change(CalculateHours($(this)), you call the function CalculateHoursand pass its return value to the jQuery method change, as if it were a function. You will only write this if your function returns another function, and you want to add the returned function as an event handler.
You need to write .change(function() { CalculateHours($(this)); })
source
share