I have a variable that’s being changed all the time in the course of my application. Can I make an element change (contents, colour, whatever), when the variable changes?
Or do I have to change the element each time I change the variable. Ideally, the result would almost be like binding a change event to the variable…
Thanks
Gausie
look here:
Listening for variable changes in JavaScript or jQuery