I have a div with tabindex attribute set to '-1' so it can gain focus on mouse click.
<div tabindex='-1'></div>
.div:focus{//some style}
I want to do something with Jquery when the user clicks the div but only if it is selected (after second click).
$('div').click(function(){
if($(this).is(':focus')){
//do something
}
});
But it doesn't work, the action is immediately triggered.
EDIT: Code included.