I can blur <SELECT>
when option selected by .change()
But how can I blur <SELECT>
when <SELECT>
open and click another element or <BODY>
?
Normally we have to click <BODY>
2 times to blur <SELECT>
element right ?
How can I do only one click ?
$("select").focus(function () {
$("code").html("focus");
}).blur(function () {
$("code").html("blur");
});
$("select").change(function(){
$("select").blur();
});
Why I can't do like..
$("*:not(select)").click(function(){
$("select").blur();
});
I just only need to detect is <SELECT>
open or close
Demo : http://jsbin.com/owitot/1/edit (try to open select box and click body)