I have only just discovered from S.O that arrow functions are not available in IE :(
"Arrow function" not working in IE, why?
I am using Barba.js to transition between web pages.
var transEffect = Barba.BaseTransition.extend({
start: function () {
this.newContainerLoading.then(val => this.fadeInNewContent($(this.newContainer)));
},
fadeInNewContent: function (nc) {
. . .
// fade outy stuff
$(this.oldContainer).delay(800).fadeOut(400).promise().done(() => {
nc.css('visibility', 'visible');
nc.fadeIn(800, function () {
$('#loader').removeClass('loading');
_this.done();
}
});
});
}
});
Barba.Pjax.getTransition = function () {
return transEffect;
};
Barba.Pjax.start();
How can I convert these arrow functions to use functions
instead?
I could wrap this script inside of an if
Navigator userAgent but this is not ideal.