【发布时间】:2012-03-19 15:44:31
【问题描述】:
我有一个过滤器操作,我希望每个 div 在点击时淡入或淡出;但是,当 div 淡出或淡入时,我希望看到它们滑入到位,而不是跳过。
http://theoaks.turnpostadmin.com/floor-plans/
我可以添加什么来使它像 jquery.easing 或其他东西一样发生
这是我目前所拥有的
$(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;
});
});
谢谢
杰米
【问题讨论】:
-
我尝试了一些可能的事情,但仍然没有运气
标签: jquery wordpress jquery-ui jquery-easing