Skip to content

Instantly share code, notes, and snippets.

@neekey
Created August 13, 2012 07:31
Show Gist options
  • Save neekey/3337808 to your computer and use it in GitHub Desktop.
Save neekey/3337808 to your computer and use it in GitHub Desktop.
IE6 Hover fix
/**
* IE6 Hover fix
* @depend KISSY
* @author 隐若 <[email protected]>
*/
(function( S ){
'use strict';
var clsHover = 'hover';
if( S.UA.ie == 6 ){
S.ready(function(){
S.all( '.J_HoverFix').each(function(){
this.on( 'mouseleave mouseenter', function( e ){
var type = e.type;
var method = type == 'mouseenter' ? 'add' : 'remove';
S.DOM[ method + 'Class' ]( this, clsHover );
});
});
});
}
})( KISSY );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment