Skip to content

Instantly share code, notes, and snippets.

@rafbm
Last active September 5, 2015 19:05
Show Gist options
  • Save rafbm/536465 to your computer and use it in GitHub Desktop.
Save rafbm/536465 to your computer and use it in GitHub Desktop.
/**
* ♫ Firefox-Proof Focus Styles ♫
*
* Define your focus styles this way: a.focus { outline: 2px solid hotpink; }
* Only mini-tiny-pico quirk is a slight delay before the focus style appears.
*
* https://gist.github.com/536465
*/
$('a').bind({
keyup: function(e) {
if (e.which == 9)
$(this).addClass('focus')
},
blur: function() {
$(this).removeClass('focus')
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment