Анимация. Помогите понять почему не работает.
Приветствую посетивших мой топик.
Помогите пожалуйста разобраться почему не работает анимация... Вот код (если код кривоват, то просьба учитывать что я еще учусь):
$(document).ready(function () {
//MOUSE OVER
$('.linkBg a').mouseover(function(){
/*Flower show START*/
$(this).prev().find('div.slider').animate({width: "50px"}, {queue:false, duration:1000,easing:'easeOutCubic'});
$(this).prev().find('div.flowerTopLeftPart').animate({backgroundPosition: "0px 0px"}, {queue:false, duration:1000});
$(this).prev().find('div.flowerTopRightPart').animate({backgroundPosition: "0px 0px"}, {queue:false, duration:1000});
$(this).prev().find('div.flowerBottomLeftPart').animate({backgroundPosition: "0px 0px"}, {queue:false, duration:1000});
$(this).prev().find('div.flowerBottomRightPart').animate({backgroundPosition: "0px 0px"}, {queue:false, duration:1000});
/*Flower show END*/
/*LinkBg show START*/
$(this).animate({height:"39px"}, {queue:false, duration:1000});
/*LinkBg show END*/
/*Flower2 show START*/
$(this).prev().find('div.flower2Holder').animate({marginLeft: "40px"},{queue:false, duration:800,easing:'easeOutCubic'});
$(this).prev().find('div.flower2TopLeftPart').animate({backgroundPosition: "0px 0px"}, {queue:false, duration:1000});
$(this).prev().find('div.flower2TopRightPart').animate({backgroundPosition: "0px 0px"}, {queue:false, duration:1000});
$(this).prev().find('div.flower2BottomLeftPart').animate({backgroundPosition: "0px 0px"}, {queue:false, duration:1000});
$(this).prev().find('div.flower2BottomRightPart').animate({backgroundPosition: "0px 0px"}, {queue:false, duration:1000});
/*Flower2 show END*/
});
//MOUSE OUT
$('.linkBg a').mouseout(function(){
/*Flower hide START*/
$(this).prev().find('div.slider').animate({width: "15px"}, {queue:false, duration:1000,easing:'easeOutCubic'});
$(this).prev().find('div.flowerTopLeftPart').animate({backgroundPosition: "7px 7px"}, {queue:false, duration:1000});
$(this).prev().find('div.flowerTopRightPart').animate({backgroundPosition: "-7px 7px"}, {queue:false, duration:1000});
$(this).prev().find('div.flowerBottomLeftPart').animate({backgroundPosition: "7px -7px"}, {queue:false, duration:1000});
$(this).prev().find('div.flowerBottomRightPart').animate({backgroundPosition: "-7px -7px"}, {queue:false, duration:1000});
/*Flower hide END*/
/*LinkBg hide START*/
$(this).animate({height:"24px"}, {queue:false, duration:1000});
/*LinkBg hide END*/
/*Flower2 hide START*/
$(this).prev().find('div.flower2Holder').animate({marginLeft: "0px"},{queue:false, duration:800,easing:'easeOutCubic'});
$(this).prev().find('div.flower2TopLeftPart').animate({backgroundPosition: "12px 12px"}, {queue:false, duration:1000});
$(this).prev().find('div.flower2TopRightPart').animate({backgroundPosition: "-12px 12px"}, {queue:false, duration:1000});
$(this).prev().find('div.flower2BottomLeftPart').animate({backgroundPosition: "12px -12px"}, {queue:false, duration:1000});
$(this).prev().find('div.flower2BottomRightPart').animate({backgroundPosition: "-12px -12px"}, {queue:false, duration:1000});
/*Flower2 hide END*/
});
});
Вобщем-то все ок, анимация работает везде и всегда, за исключением события mouseout. А конкретнее - сдвигаются бэкграунды без анимации у блоков: div.flowerTopLeftPart div.flowerTopRightPart div.flowerBottomLeftPart div.flowerBottomRightPart div.flower2TopLeftPart div.flower2TopRightPart div.flower2BottomLeftPart div.flower2BottomRightPart Хотя при mouseover анимация работает в порядке... Направьте в нужнкю сторону, тыкните носом в код... я даж не знаю что еще. Просто помогите, пожалуйста. Надеюсь объяснил понятно, ели же нет - то уточню что требуется. Спасибо за внимание. |
Апаю топик.
Неужели ни у кого не бывало подобного? Если что-то надо уточнить, то скажите, что именно. |
Цитата:
|
Фактически - бэкграунд сдвигается как указано .animate({backgroundPosition: "12px 12px"}, {queue:false, duration:1000})
Но именно анимация не присходит. |
поэкспериментируй, выясни влюияют ли соседние анимации друг на друга, возникают ли такие проблемы при анимации другого свойства
|
| Часовой пояс GMT +3, время: 19:15. |