0
Я хочу иметь более одного идентификатора div, чтобы начать эту анимацию. Почему это не работает?Активировать несколько ID jQuery
Я имею в виду следующее:
$("#treest, #treest2, #treest3").click(function() {
anim10();
});
Вот полный код
/** ANIMATE DropDown */
var $a = $("#navigation"),
$b = $(".mainNavitem:eq(1)"),
$c = $(".c");
function anim1() {
$b.animate({width: 395}, {duration: 300, complete: anim2});
}
function anim2() {
$a.animate({top:"70px"}, {duration: 400});
$c.animate({top:"70px"}, {duration: 400});
}
$("#mains").click(function() {
anim1();
});
function anim10() {
$c.animate({top:"0px"}, {duration: 200});
$a.animate({top:"0px"}, {duration: 200 , complete: anim20});
}
function anim20() {
$b.animate({width: 80}, {duration: 200});
}
$("#treest, #treest2, #treest3").click(function() {
anim10();
});
У вас есть идея, как я могу это исправить?
EDIT:
как вы определили a/c? работает ли какая-либо анимация? – Igle
В чем ваши переменные '$ a',' $ b' и '$ c'? Глобальный масштаб? – Tibo
Только один момент я отредактирую его – andre34