だから私はFF、Safari、およびChromeでうまく機能する非常に基本的なjQuery .slideDownを使用しています。IE7 ではまったく動作しません。ここにスクリプトがあります:
//Top Mailing List Drop down animation
$(document).ready(function() {
$('div#top_mailing_hidden').hide();
// Expand Panel
$("input#top_mailing").focus(function(){
$("div#top_mailing_hidden").slideDown("slow");
});
// Collapse Panel
$("input#top_mailing").blur(function(){
$("div#top_mailing_hidden").slideUp("slow");
});
});
私は何時間も調査してきましたが、スライドアップ/ダウンに関連するバグについて何かを見つけました。このバグは、postion:fixed 要素の子孫で使用すると IE7 で失敗します。このアニメーションは position:fixed navbar 内で発生していますが、内部要素を position:relative でラップしようとしましたが、役に立たず、IE ではまだ何も得られません。また、nav 要素が jQuery で非表示になっていることに注意してください。その機能は IE7 でも機能しますが、スライドアップ/ダウンは機能しません。
関連する CSS は次のとおりです。
/* --------------Top Dropdown Mailing List------------------- */
#top_nav div#top_mailing{
float: right;
width: 351px;
padding: 0 10px 10px 5px;
background: url(images/top_mailing_bg.png) bottom center no-repeat;
position: absolute;
top: 0;
right: 0;
color: #fff;
text-shadow:0 -1px 0px #222;
}
#top_mailing #top_mailing_hidden{
font-size: .7em;
text-align: center;
position: relative;
height: 30px;
zoom: 1;
}
#top_mailing #top_mailing_hidden div{
}
#top_mailing #top_mailing_hidden a{
color: #acffc0;
font-weight: bold;
}
#top_mailing #top_mailing_visible{
height: 30px;
font-weight: bold;
font-size: .9em;
padding-top: 5px;
}