なんて負荷の高い質問だと思います。先週の金曜日、この正確なスクリプトは、関連するすべてのページで機能していました。
$('.textBoxes img').bind('showText',function(e) {
$(this).fadeIn(1100,function(){
// this is the callback after the fadein
// here we want to wait (use a timeout)
var next = $(this).next();
if (next.length)
setTimeout(function() {
// before the next text is shown
next.trigger("showText");
}, 2500);
})
}).eq(0).trigger('showText');
動作したサンプル html:
<div class="textBoxes">
<img src="/sites/all/themes/hr_microsite/images/sma-philo-copy-1.png" alt="" class="smaPhiloCopy1">
<img src="/sites/all/themes/hr_microsite/images/sma-philo-copy-2.png" alt="" class="smaPhiloCopy2">
</div>
...そして、最初にテキストを非表示にする css:
.smaPhiloCopy1, .smaPhiloCopy2, .historyCopy1, .historyCopy2, .historyCopy3, .natureCopy1, .natureCopy2, .homesCopy1, .homesCopy2, .homesCopy3, .stayingPowerText1, .stayingPowerText2, .stayingPowerText3, .ourStandardsCopy1, .ourStandardsCopy2, .ourStandardsCopy3, .organizationText1, .organizationText2, .cityCopy1, .cityCopy2, .cultureCopy1, .cultureCopy2, .cultureCopy3, {
display:none;
}
すべての画像は透明な png であり、親 div 内に絶対に配置されます。
そのため、そのクラスの div とさまざまな画像を含む複数のページがあります。スクリプトは、一度に 1 つずつ各グラフィックでフェードインし、各画像間で遅延する必要があります。
今朝来て、URL にアクセスすると、すべての画像が画面に表示されます。色あせは一切ありません。どのブラウザでもエラーはありません。
firebug では、コンソールでこれを実行すると、ページの読み込み時にすべて正常に動作します。
$('.textBoxes img').css('display','none');
$('.textBoxes img').bind('showText',function(e) {
$(this).fadeIn(1100,function(){
// this is the callback after the fadein
// here we want to wait (use a timeout)
var next = $(this).next();
if (next.length)
setTimeout(function() {
// before the next text is shown
next.trigger("showText");
}, 2500);
})
}).eq(0).trigger('showText');
Drupal とブラウザーのキャッシュをクリアしましたが、これが機能しない理由がわかりません。html、css、jquery ファイルまたは画像に変更を加えていません。非常に奇妙な?
EXTRA SERVER 注: これは何の意味もありませんが、サーバー自体が同期していないため、ファイルには 1 週間前の日付が含まれていますが、アップロードすると置き換えられます。Firebug 内で、スクリプトと css を確認できます最新のファイルがアップロードされていることを確認します。誰かがそれについて何か他のことを知っている場合に備えて。