Skip to content

Instantly share code, notes, and snippets.

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

irwinv commented May 5, 2013

j'obtiens cette erreur sur FF : ReferenceError: setFocus is not defined

@asper
Copy link

asper commented May 5, 2013

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