I am trying to hide elements after the element has appeared for 2 seconds.
I am trying:
function hideNotif(i) {
  $('#'+i).fadeOut();
}
for (var i = 0; i <= 10; i++) {
  setTimeout(function () {
    hideNotif(i);
  }, 2000);
}
It only hides the first element however.
 
    