JSFiddle - React, Tailwind, and code Playground

HTML

<div id="a">a</div>
<div id="b">b</div>
<div id="c">c</div>
<div id="log"></div>

CSS

#a,#b,#c{
    width : 60px;
    height : 40px;
    float : left;
    margin : 10px;
    background-color : #ccc;
    border : 3px solid red;
    text-align : center;
    padding-top : 20px;
}
#log{
    position : fixed;
    bottom : 10px;
    background-color : #888;
    -webkit-border-radius : 20px;
    -moz-border-radius : 20px;
    border-radius : 20px;
    color : #fff;
    opacity : 0.8;
    margin : 10px;
    height : 300px;
    width : 80%;
    overflow : auto;
    padding : 30px;
}

JavaScript

var p = $('<p />');
function log(msg){
    $('#log').append(p.clone().html(msg)).scrollTop($("#log").get(0).scrollHeight);
}

var elements = $('#a');

$(document).mousemove(function(e){
    console.log(e.target);
    if(elements.get().indexOf(e.target) != -1)
        var msg = "over a or b";
    else
        msg = "<b>NOT</b> over a or b";
    log(msg);
});