Created
May 5, 2013 12:23
-
-
Save irwinv/5520695 to your computer and use it in GitHub Desktop.
setFocus work fine with Chrom but FireFox send me back : ReferenceError: setFocus is not defined
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.addEvent('mouseenter', function() { | |
console.log(setFocus()); | |
this.setFocus(); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
j'obtiens cette erreur sur FF : ReferenceError: setFocus is not defined