jQuery を使用して複数の div をナビゲートできるスクリプトを作成しましたが、6 番目の div が表示され、.is(":visible") を使用してもうまくいかない場合は、親に CSS の変更を加えたいと考えています。 .
$(document).ready(function() {
/* Set the frame to #sf1 */
$('#sf2, #sf3, #sf4, #sf5, #sf6').hide();
/* Slide Animation for Next Slides */
$('.nextbutton').click(function() {
$(this).parents('li').fadeOut(300);
$(this).parents('li').next().fadeIn(300);
if ($('#sf6').is(":visible") == "true") {
alert('that just happened');
$('#stepForm').css('height', 'auto !important');
}
});
/* Slide Animation for Previous Slides */
$('.prevbutton').click(function() {
$(this).parents('li').prev().fadeIn(300);
$(this).parents('li').fadeOut(300);
});
});