I declare a variable which gets it's value through another event out of a select-box. Since there are different events which change the variable (lets name it z
), I want to get informed when the variable gets changed.
So my question is: What is the best way to get informed when a variable gets changed?
z.change(function(){});
throws an error.
Are there ways to do this without a hidden input-field or other helpers like that?