I am using the stellar.js to make a paralax site. I have images of feet set up to show at different points during scrolling. I am trying to write a function that will hide all other copies of the feet when one is shown. I can't change the stellar file itself to do this so I have to try and use an outside function:
//Feet on slide
$('.walkingFoot').each(function() {
if ($(this).css('display') == 'block') {
$('.walkingFoot').not(this).css('display','none');
}
});
All of the feet images in the set are in the .walkingFoot class. What I am trying to do is hide all other feet in the class when the display property is set to block. The code above does not seem to be working. Any help would be greatly appreciated.
You can change your code in:
$('.walkingFoot').each(function () {
if ($(this).is(":visible")) {
$('.walkingFoot').not(this).hide();
}
});
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments