I'm scratching my head as to why I'm getting two callbacks when running this function.
lE = $(this).clone().appendTo('body');
// Hide submenu
$('nav>ul>li>ul').fadeOut(100, function() {
// Animate clone
$(lE).animate({ 'top': '160px' }, 100, function() {
console.log('aaa'); // PRINTS TWICE IN CONSOLE
$(lE).animate({ 'left': '150px' }, 300, function() {
$(lE).addClass('lE');
});
});
});
As you can see I start by assigning a clone to lE. Surely lE can only be a single element at this point no?
I then proceed to run a three animations within each other but the second animation get's called back twice. I can't understand why.