This I’m sure has a really easy answer:
I have a search form that when you focus on the form additional buttons pop under the form to allow you to filter choices, I’m trying to make it so on blur on the search form those options go away. Currently when you click on one of those options it closes the option menu, so I’m looking for a way to test if those options were clicked. Here is the code I’ve come up with so far:
$("#search").blur(function(){
$("#selector").click(function(){
return false;
});
$("#selector").toggle();
});
Also attempting to do something like the following yielded failing results:
var is_clicked = true;
$("#selector").click(function(){
is_clicked = false;
});
console.log ( is_clicked ); // always returns true
See this : http://jsfiddle.net/gP8Jg/1/
Try to using
mousedown()instead ofclick()