How do i add fadeIn and fadeOut to this script? So when you press arrowr or arrowl the text will fadeout and fadein
When i try to do it, it wont work correctly.
var all = $('.img').addClass("passiv");
var i = -1;
$('#arrowl').click(function() {
ctrlKunder( i = !i ? all.length - 1 : --i );
});
$('#arrowr').click(function() {
ctrlKunder( i = ++i % all.length );
}).click();
function ctrlKunder(ele) {
all.removeClass("active").addClass("passiv");
all.eq(ele).removeClass("passiv").addClass("active");
}