I have a page which has multiple elements that all have the same classname.
Some of them are being repositioned and when I submit the page I would like to hide the elements which are at a position of top: 0;
I've been looking at some suggestions and I've tried something like this:
$('.myClass').not($('.myClass').css('top', '0')).fadeOut(300);
But appearantly that's not working :-)
Anybody else has an idea on how to accomplish this?
Thanks
Loop over every element with the class then check for its css property:
$('.myClass').each(function(){
if($(this).css('top')==='0'){
$(this).fadeOut(300);
}
});