FadeIn anti-aliased font problem for IE6-8
I have this html code
<li class="viewport">
<a href="#" target="_blank">
<div class="xq"><h4>Hello</h4>
<p>More</p>
<div class="xq-bg">
</div>
</div>
<img src="./images/grid-view/20130515111734676.jpg" alt="" width="156px" height="120px">
</a></li>
.viewport{
width:156px;
height:120px;
position:relative;
float:left
{
.xq{
display: none;
height: 100%;
position: absolute;
text-align: center;
text-decoration: none;
width: 100%;
z-index:1;
color:#fff;
cursor:pointer;
}
.xq .xq-bg{
position:absolute;
left: 0;
bottom: 0;
width:100%;
height: 100%;
background-color: #2a2322;
opacity: 0.7;
filter:Alpha(opacity=70);
}
.xq h4{
position:relative;
z-index:2;
font-weight: normal;
margin:38px 0 8px 0;
font-size: 18px;
margin:10px 0;
}
.xq p{
position:relative;
z-index:2;
margin:0 15px;
}
<script type="text/javascript">
$(document).ready(function () {
$('.viewport').mouseenter(function (e) {
$(this).children('a').children('.xq').fadeOut(200);
})
.mouseleave(function (e) {
$(this).children('a').children('.xq').fadeOut(200);
});
});
</script>
when I test it on IE, it has some anti-aliased problem that is pretty ugly, so I search on google, and find the solution to remove the filter, which is shown below.
<script type="text/javascript">
$(document).ready(function () {
$('.viewport').mouseenter(function (e) {
$(this).children('a').children('.xq').fadeIn(200, function(){
if (!$.browser.msie){$('xq').style.removeAttribute('filter');}
});
})
.mouseleave(function (e) {
// $(this).children('a').children('.xq').fadeOut(200);
$(this).children('a').children('.xq').fadeOut(200, function(){
if (!$.browser.msie){$('xq').style.removeAttribute('filter');}
});
});
});
</script>
however, the code shown above, is not working any more. why is that?
In addition, ".removeAttribute" is not supported on ie6-7, is there an alternative to do it? (this project is mainly designed for Chinese users, and ie6 shares a big market share in China).