To debug some JavaScript code, I am looking for JavaScript code (preferably just js, without libraries and dependencies) that can highlight a div
or span
(probably by putting over it a div or span of the same size and shape with a bright color and some transparency).
I pretty sure it can be done, but I don't know how to start.
CLARIFICATION
I need to put a semi transparent div
on top of my element. Modifying the background or adding borders will not help as my elements have themselves backgrounds and borders.