Close a SELECT dropdown list programmatically with Javascript/jQuery

I’m not sure about anyone else, but I’m using the latest stable build of Chrome, and none of the other answers involving .blur() work for me.

This question asks the inverse: Programmatically open a drop-down menu

The conclusion that seemed to be obtained is that it’s not possible due to the way the browser handles field element clicks.

A better solution would be to replace the dropdown with a pure HTML one and hide it when needed with a simple .hide() command.

Leave a Comment