Add .on change function to js example so the code runs when the state select is changed. Tested and working.