TweenMenu javascript
lessons learned:
-
Working with jQuery is pretty fast and intuitive, but it requires some
attention when it comes to effect stacking
and locks, timeouts.
-
Html is what it is: easy to modify, very flexible,
yet browser quirks make our lives much harder:
-
On webkit (I tested with Safari and Chrome) the initial left (position().left)
and width (.width()) detection doesn't work. It's not "my"
fault, but clientLeft/offsetLeft gives back useless garbage (also tried with PPK's workaround).
EDIT: moving the css before
all the scripts does help, like it is said in the jQuery documentation.
-
Movement can be laggy on FF2 and IE6 (nothing new, move along).
-
Since I'm using a single item buffer (not a stack) for storing the previous
item some items may remain active if the mouse movement is slow enough. Adding a lock
and a queue would probably help, but again, it's an overkill for such an experiment.