I need every x seconds a li
of my menu to be hidden and I have this code:
$('.area-menu .close').click(function(){
delayed();
});
function delayed() {
var liMenu = $('.area-menu li').not('.marginless');
var time = 1000;
liMenu.each(function(){
setTimeout(function() {
console.log($(this));
}, time);
time += 1000;
});
}
But when I immediately $(this)
it does not return anything to me. How would you give a hide()
that is in each li
of my menu? And where am I going wrong?