jquery - Mouseover Grayscale not working in IE9 -
i having issues mouseover state in ie9 , hoping me.
this element various sizes , why reluctant use background image sprite.
my issue when hover on item image turns grey, when hover on tick in middle gray scale effect lost, guessing ie9 thinks no longer hovering on item, when am.
http://www.tindlemanor.co.uk/jtest/cameron/11.html
i have played mouse on example on jquery , works in ie9, guesing doing bit stupid.
it works in other browsers, including ie8 , ie7, if happened in 7 understand , let slide, fact in 9, means need address this.
thanking in advance.
cameron
the issue may caused conflict between :hover
pseudo class in css , onmouseover
, onmouseout
events in jquery. think have found solution background losing filter when hover on green tick though:
appears work in ie9 , chrome still. jsfiddle doesn't work in firefox, think that's down other reasons.
i restructured jquery onmouseover
, onmouseout
events hover()
event (i doubt made difference) , commented out lines set opacity
properties in .grayscale
class.
have in ie9 , let me know think.
$(document).ready(function () { $(".inspire-me").hover(function () { $(this).addclass("on"); // $(this).find('.grayscale').css('opacity', '0.50'); $(this).find('.content-lower').css('opacity', '1'); var margin = $(this).find('.grayscale').height() / 2; var half = margin - 17; $(this).find('.hide').css('visibility', 'visible'); $('.hide').css({'top' : half}); } , function () { $(this).removeclass("on"); // $(this).find('.grayscale').css('opacity', '1'); $(this).find('.hide').css('visibility', 'hidden'); });
update
i have got working in firefox specifying full svg xml in filter
property in css:
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><fecolormatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");
Comments
Post a Comment