I have a supposed product gallery, with divs aligned using {display: block; float: left;}
I've caused some divs to disappear depending on the menu selected using fadeOut()
and reappear with fadeIn()
.
I've created this code to make this happen:
var tipo="all";
$('a.type').click(function(){
$('a.type').removeClass('Bolding');
$(this).addClass('Bolding');
tipo=$(this).attr('id');
$(".imagem").each(function(){
if($(this).hasClass(tipo) || tipo=="all"){
$(this).fadeIn();
}else{
$(this).fadeOut();
}
})
})
When the divs are added they get the value {display:none}
disappearing from the page. the problem is that other divs simply jump to the future position. And I wanted them to do an animation to the next position fitting. Take the example this plugin , only it gets paid.
I do not want to use CSS3 for compatibility.