usablica/intro.js — pull request #56 by casiotone (2013-03-20 20:00:42+00:00)
Title: Highlighting fix for elements which are children of positioned elements with a z-index.

This is intended to fix issue #50

I refactored the way highlighting works. Previously, the highlight was a CSS class with a high z-index that was applied to the targetElement. Since children cannot have higher z-indexes than their parents, this made it impossible to highlight certain elements.

This patch replaces the highlight class with a more complex (and, frankly, a little tacky) method wherein the target element is copied, along with its styles and children, and placed into the helperLayer itself.

This will likely cause some other issues, but these issues are something that can be resolved whereas the z-index issue with the highlight class could not have been (it's simply just not possible to have a child element with a z-index higher than its parent).

This isn't the most graceful approach, but I'm struggling for an alternative. Please review the changes, do some testing, and let me know what's broken.