Change helper to js/coffee

Hi…

I have:

>.....

This returnes a class to alter the background-color, but only on reload.
As the page is not submitted(ajax) on entry new values, I want to change this helper to a js/coffee function so if val 2 > val 1
the background color changes.

How to approch that?

Thanks for support
Werner