Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Some way of setting value of the selection through JS #608

septerr opened this Issue · 3 comments

4 participants


Say the select box has an id of "foo". Incorporating chose.jquery.js in our existing code base breaks any Javascript that does things like -



$('foo').style.display = 'none;' //this we can resolve by enclosing all our select boxes in a span which we can hide instead of the select box itself.

Is there any way you can catch JS calls that modify the select boxes value and accordingly update the awesome drop down that chosen displays?


There is no event triggered by the browser when setting the value programmatically, which is why Chosen cannot know about the change. The solution is to trigger the liszt:updated event on the select box after changing it (be it because you changed the value or because you changed the options).


Triggering liszt:updated seems to reset the value of the select though as can be seen in the console here...


I believe this is now fixed in b028f9e. Please pull the latest and re-open if you're seeing the problem still.

@pfiller pfiller closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.