I've made this script that lets you navigate through multiple divs with jQuery, but I want to make a css change to the parent if the 6th div is shown and using .is(":visible") hasn't given me any luck.
$(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);
});
});