I have a filter action that is working the way I want each div fades in or out on click; however when the divs fade out or in, instead of just jumping over I would like to see them slide into place.
http://theoaks.turnpostadmin.com/floor-plans/
What can I add to this to make that happen like a jquery.easing or something
Here is what I have thus far
$(document).ready(function() {
$('#filter a').click(function() {
$(this).css('outline','none');
$('#filter .current').removeClass('current');
$(this).parent().addClass('current');
var filterVal = $(this).text().toLowerCase().replace(' ','-');
if(filterVal == 'all') {
$('ul#portfolio li.hidden').fadeIn('slow').removeClass('hidden');
} else {
$('ul#portfolio li').each(function() {
if(!$(this).hasClass(filterVal)) {
$(this).fadeOut('normal').addClass('hidden');
} else {
$(this).fadeIn('slow').removeClass('hidden');
}
});
}
return false;
});
});
Thanks
Jamie