How can I get correct/expected opacity to apply to elements that are displayed using $().fadeIn() in IE8?
I have a weird CSS/jQuery gotcha that I can't figure out.
I have three forms on my page, but o开发者_如何学JAVAnly one can be displayed at a time, so I hide all them by default using CSS
form fieldset {
display: none;
}
I then display them dynamically using jQuery method fadeIn().
However, when I call the fadeIn() method on the each fieldset, the CSS rules for the label fonts are not being applied in IE8. IE Developer Tools says that font-family is Verdana, Arial, sans-serif
, but the labels are all displayed with Arial.
CSS:
label {
font-family: Verdana, Arial, sans-serif;
font-size: 12px
font-weight: bold;
}
HTML:
<label for="State">
State *:
</label>
Ok. Here's the best solution I could come up with:
$(this).fadeTo(350, 1, function(){
$(this).removeAttr("style").css("display", "block");
myHide($addressFormFieldSet);
myHide($uploadFormFieldSet);
});
}
精彩评论