Skip to content

Instantly share code, notes, and snippets.

@asper
Forked from irwinv/gist:5520695
Created May 5, 2013 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asper/5520750 to your computer and use it in GitHub Desktop.
Save asper/5520750 to your computer and use it in GitHub Desktop.
<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>
@irwinv
Copy link

irwinv commented May 5, 2013

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment