tiny-slider
Version:
Vanilla javascript slider for all purposes, inspired by Owl Carousel.
17 lines (15 loc) • 391 B
JavaScript
// Element.previousElementSibling
(function () {
"use strict";
if (!("previousElementSibling" in document.documentElement)) {
Object.defineProperty(Element.prototype, "previousElementSibling", {
get: function(){
var e = this.previousSibling;
while(e && 1 !== e.nodeType) {
e = e.previousSibling;
}
return e;
}
});
}
})();