jessyink-team team mailing list archive
-
jessyink-team team
-
Mailing list archive
-
Message #00043
Re: updated the keyboard branch...
On Wed, 2009-07-01 at 21:56 +0100, Egor Zindy wrote:
> Hey Haness,
>
> I'm sure you're right as counter is only really used in mouseover and
> that would save one function call. Out of interest though, how would
> you work out which slide "this" is without the counter attribute? At
> the moment, all I have to do is:
>
> counter = parseInt(this.getAttribute("counter"));
You could save the slide number in the slides array, but since you have
it when the event handler is assigned, you can put it there as a string.
Something down the lines of:
node.setAttribute("onmouseover", "if ((currentMode == INDEX_MODE) &&
(activeSlide != " + counter + ")) { indexSetActiveSlide(" + counter +
"); };");
Cheers,
Hannes
Follow ups
References