+1  A: 

The callback is called after the animation (changing opacity value) is done.

So if you remove the callback and append it directly after the animate, it will remove the classes before the animation is done.

Else if you remove the callback completely, you lost the way to remove the classes (of course XD")

PeterWong
But why do the classes need to be removed at all? I understand if .last-active goes but .active needs to be there, right?
yatman
I think it's because the function is called every 5 seconds. If you don't remove the active class, then the fading effect on every once-actived elements would occur every 5 seconds. I think there should be a function to set which elements to be active.
PeterWong
Ok, I got it. Thanks for your help too Peter.
yatman
+1  A: 

That callback is removing the classes from the previously active slide ($active).

$next becomes the new active slide (and gets the class from the statement just prior to animate).

If the code didn't remove the class from $active there would be two active slides after all is said and done.

Jeff Sternal
Ahh, I get it now. Only $active is getting its classes removed, not $next.Thanks a lot for your help, Jeff!
yatman