嘿,我正在盡我所能找到一種方式,當用鼠標懸停時,將其他選項調暗並放大(提前)懸停物品鼠標正在打開。jQuery突出顯示/縮放懸停物品和朦朧其他
我的代碼可以在這裏找到>Code link
我有沒有選擇的工作就好了衰落的項目...只需要在懸停項目的縮放幫助!
代碼中,我目前擁有的變焦效果是可怕的,不會在所有的工作....
$('.category-container').bind('mouseover',function() {
$(this).addClass('hover').stop(true,true);
$('.category-container').not('.hover').stop(true,true).fadeTo('fast',0.2).animate({
width: '2em',
height: '2em',
}, 200);
});
$('.category-container').bind('mouseout',function() {
$('.category-container').removeClass('hover').stop(true,true).fadeTo('fast',1);
});
任何幫助將是巨大的!
UPDATE
我得到了它,我想效果工作...只是似乎並不在項目褪色,如果你動過彼此不首先讓列表淡入第一:new code
當你說「縮放」,你的意思是讓大?你不能只添加$('。hover')。animate({width:// whatever}); – Adam
是的,讓它脫穎而出。 – StealthRT
ol會有一些li元素不是 – Popnoodles