Reputation: 393
I am using chosen.js (http://harvesthq.github.com/chosen/) and I have a select box that I want to manipulate the page based on the chosen option. I see in their docs they have an example on how to do this. The only problem is that when I run this script.
$("#form_field").chosen().change(function() {
console.log('hit');
});
It runs on first change. Then it dies and it never runs again.
I also tried adding a '.bind()' but that didn't work either.
$("#form_field").bind('change',function() {});
Upvotes: 4
Views: 6275
Reputation: 393
Ok the problem was that my options had the same name for each. So it was not registering the change. I need some sleep loosing my mind...
Thanks for your help Lucuma!
Upvotes: 1