simon
-
Posts
2 -
Joined
-
Last visited
Posts posted by simon
-
-
Thanks... I just had the exact same problem (using firefox.) David's solution worked for me, but I am now looking at different ways to refer to the span element as the DOM traversal method seems too risky.
Simon
I've settled on this for now:
target.parentNode.getElementsByTagName('span')[0].style.visibility = 'visible';
Page 385 - Chapter 10 - Tooltips
in Modern Javascript: Develop and Design
Posted
Thanks for looking at that HartleySan. I'm trying to stay away from libraries for the moment. I did see today that there is an API for traversing documents as trees of elements while ignoring text nodes. It's not implemented in IE though. Here's what I've been playing around with. It seems to work, but doesn't test for nextElementSibling or previousElementSibling:
- based on Javascript - The Definitive Guide (pages 372 - 374)