Question: I want to check if a element is being hovered over. I get this error: 

```
Syntax error, unrecognized expression: unsupported pseudo: hover

```

when I use this code:

```
 $('.class').blur(function(){
    if(!$(this).is(':hover')){
       //element not being hovered over
    }
 });

```

i also tried this:

```
 $('.class').blur(function(){
    if($(this+":hover").length === 0){ 
       //element not being hovered over
    }
 });

```

this also does not work. Is there any other way of doing this. Thanks.

Answer: 
```
$(".class").mouseover(function(){   
    $(this).attr('checked',true);   
    });  
});

```
**jQuery has this functionality built-in.** [See documentation on .hover()](https://api.jquery.com/hover/)

```
$(".class").hover(
  function() {
    // item is being hovered over
    $(this).addClass('hover');
  }, function() {
    // item is no longer being hovered over
    $(this).removeClass('hover');
  }
);

```