javascript - How to use feature detection to know if browser supports css hover? -


how can use feature detection determine whether browser supports :hover pseudo class? want without using conditional comments include ie6-specific script files if possible.

the :hover pseudo-class supported standards compliant browsers. browsers ie6 support <a> elements.

you can use hover changes on thing using jquery, name one.

$('.class').hover(     function(){         $(this).addclass('hover');     },     function(){         $(this).removeclass('hover'); }); 

in css, use class .hover in place of pesudo-class :hover


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -