こんにちは、私は以下のコードを使用しています...
<script type="text/javascript">
$(function() {
$('#show_advertisement').click(function() {
$('#gallery_logos').fadeOut('slow');
$('#gallery_illustrations').fadeOut('slow');
$('#gallery_webdesign').fadeOut('slow');
$('#gallery_advertisments').fadeIn('slow');
});
$('#show_logo').click(function() {
$('#gallery_advertisments').fadeOut('slow');
$('#gallery_illustrations').fadeOut('slow');
$('#gallery_webdesign').fadeOut('slow');
$('#gallery_logos').fadeIn('slow');
});
$('#show_illustration').click(function() {
$('#gallery_advertisments').fadeOut('slow');
$('#gallery_webdesign').fadeOut('slow');
$('#gallery_logos').fadeOut('slow');
$('#gallery_illustrations').fadeIn('slow');
});
$('#show_web').click(function() {
$('#gallery_advertisments').fadeOut('slow');
$('#gallery_illustrations').fadeOut('slow');
$('#gallery_logos').fadeOut('slow');
$('#gallery_webdesign').fadeIn('slow');
});
$('#show_advertisement').trigger('click');
});
</script>
基本的に、4 つの div に含まれる複数のライトボックス ギャラリーを表示しています。それらは互いに積み重なっており、ページ上の 4 つのリンクをクリックするとすべて表示/非表示になります。私が抱えている問題は、ページが読み込まれると、4 つの div のすべてのコンテンツの簡単なビューが表示され、それが show_advertisement div にフェードすることです。これは些細な問題ですが、ページが専門的ではないように感じます。私は Javascript や jQuery の経験がありませんが、学ぼうとしています。助けていただければ、本当に感謝しています。ありがとう!