I’m trying to have a select box automatically pop open when the use hovers over it, as if they had clicked it. Is this possible?
I would think I could do this easily with jQuery…
$("#settings-select").mouseover(
function(){
$(this).trigger("click");
}
);
But that does nothing. Any ideas?
I finally got this to work! You need Chosen; as others have pointed out, you can’t do this with a normal
selectbecause there are no events available to use. But this will pop open the menu when you mouseover theselectand close it when you mouseout, which is the exact effect I wanted.HTML:
JS:
$("#dropdown").trigger("liszt:open");is what opens the menu. There is no equivalentliszt:closeevent to trigger when you want to close it (as far as I know), but triggering aclickon it instead has the same effect.