Created
March 12, 2012 14:26
-
-
Save mbernson/2022272 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
document.addEventListener("DOMContentLoaded", function() { | |
var elms = document.getElementsByClassName( 'foo' ); | |
for( var i = 0; i < elms.length; i++ ) | |
elms[i].addEventListener( "click",function() { | |
this.focus(); | |
this.select(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment