This appears to be caused by the order that Internet Explorer processes the CSS and Javascript. There is no gap between the elements, so that is not the problem. Your code works properly in Chrome.
This is a bit ugly, but it supports my conclusion that Internet Explorer is processing the Javascript before the CSS changes & it does provide a way to get the results you would expect. Adding a setTimeout(fn, 0)
solves your problem by pausing the Javascript long enough for the CSS to be processed.
$('a').hover(function(){
console.log('hovered');
},function(){
setTimeout(function(){
if($('#bar').is(':hover')===false){
console.log('bar is not hovered');
}
}, 0);
});
Here's a jsfiddle.
You may also want to read through this question (Why is setTimeout(fn, 0) sometimes useful?), as it has some really useful info explaining what is going on.