Attach onmouseover or mousemove (I think both of these bubbles cannot remember) an event for the body, and when you hover over your actual elements, you can handle what you need to do, as it will bubble up to the body where you can handle the element that you actually masked. You can use custom attributes or expando properties of this element to handle everything you need to do when you hover over a specific element.
You really only have to attach events as you need and separate them when you no longer need them. On trivial pages, this is probably not required, but in a scenario like yours, this will improve client-side performance. We used to do such things when I was working, when we would have thousands of form elements on the page.
My two cents, nickyt
source share