-
-
Save asper/5520750 to your computer and use it in GitHub Desktop.
Et hop ! http://jsfiddle.net/PAAKF/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
window.addEvent('domready', function() { | |
var big_img = $$('#projects .realisation_big'); | |
Element.implement({ | |
setFocus: function(index) { | |
this.setAttribute('tabIndex', index || 0); | |
this.focus(); | |
} | |
}); | |
big_img.each(function(img, index){ | |
img.addEvent('mouseenter', function() { | |
this.setFocus(index); | |
}); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
C'est à dire que mon setFocus essayait d'appliquer la method sur un element d'un tableau (item index) qui n'existait pas ?, mais pourquoi une idée pourquoi sur chrome ca marchait impecc sans la boucle ?