I have an html select set to multiple. I am trying to check if the option is selected or deselected. I am doing this by left clicking the mouse while holding the ctrl key to deselect. It seems to me that everytime you click on it it can’t determine it you select it or deselect it.
Here is my code: http://jsfiddle.net/peBZe/
Note: left click why holding the ctrl key to deselect.
Try the following:
See updated fiddle here for fix
In your old code the line:
was the problem – it will always be truthy and hence will display the wrong text.