Assume I have a bunch of elements on a page. <li>, <td>, <a>, <div>, etc. Not all block tags, not all inline, but elements nonetheless. Each of these elements has a common class of "tagged".

What I want to do is getElementsByClassName ('tagged') and draw a tiny "tag" element on the top left of each of these elements. Easy enough. The tricky bit, I think, is that I'd love the tag to reposition itself if any of those elements should be repositioned by some other routine. IE: if my <div class="tagged" id="todays_sale"> gets set to display="none", I'd like my tag object to hide with it.

I don't expect that to be automatic, but I'm wondering how I'd go about capturing the style changes as events? IE: document.getElementById ('todays_sale').style.top = '100px'; would call document.getElementById ('todays_sale').tag_obj.reposition ()

Or am I expecting way too much here? Hehe.

Thanks for any suggestions!