This is very annoying. After you rollover on image, if you rollout from left, top or right edges red box disappears. But if you rollout from bottom edge red box sometimes disappears sometimes not. Why is that?
Edit:
Another weird thing is, when you check console log, mouseleave fires but doesn’t remove div!!!.
Edit 2:
Ok both answers solved the problem but still I wonder how on earth console.log logs the mouseleave in the original code but doesn’t trigger remove()?
display: blockfor image solves the problem