Skip to content

Instantly share code, notes, and snippets.

@ChristianPeters
Last active October 1, 2015 14:28
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 ChristianPeters/2008205 to your computer and use it in GitHub Desktop.
Save ChristianPeters/2008205 to your computer and use it in GitHub Desktop.
selectivizr does not support ajax. These listeners add live support for the CSS :hover pseudo selector for links and buttons, so that they are styled in IE < 9 even if they are dynamically injected.
$ ->
$('body')
.on 'mouseenter', 'a, button, input[type=submit]', ->
$(this).addClass('slvzr-hover')
.on 'mouseleave', 'a, button, input[type=submit]', ->
$(this).removeClass('slvzr-hover')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment