Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/369.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在Swiped.min.js文件中插入z索引css属性_Javascript_Css - Fatal编程技术网

Javascript 在Swiped.min.js文件中插入z索引css属性

Javascript 在Swiped.min.js文件中插入z索引css属性,javascript,css,Javascript,Css,我在样式属性方面遇到了问题,由“swiped.min.js”中的某个元素设置 当我单击按钮时,它正在定义css属性转换和变换。我想给它再添加一个属性z-index 我一直在努力解决这个问题,但没有成功。我只是一个js初学者,如果有人能指出如何将z-index添加到列表中,我将不胜感激 ! function() { function t(t, e) { document.addEventListener(t, function(t) { a._elems.forEach(f

我在样式属性方面遇到了问题,由“swiped.min.js”中的某个元素设置

当我单击按钮时,它正在定义css属性转换和变换。我想给它再添加一个属性z-index

我一直在努力解决这个问题,但没有成功。我只是一个js初学者,如果有人能指出如何将z-index添加到列表中,我将不胜感激

! function() {
function t(t, e) {
    document.addEventListener(t, function(t) {
        a._elems.forEach(function(i) {
            for (var n = t.target; n;) {
                if (n === i.elem) return i[e](t), !1;
                n = n.parentNode
            }
            return !1
        })
    })
}

function e() {
    var t = [].shift.call(arguments),
        e = arguments[0];
    for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
    return t
}
var i = window.navigator.msPointerEnabled,
    n = {
        start: i ? "MSPointerDown" : "touchstart",
        move: i ? "MSPointerMove" : "touchmove",
        end: i ? "MSPointerUp" : "touchend"
    },
    o = function() {
        var t = window.getComputedStyle(document.documentElement, ""),
            e = (Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/) || "" === t.OLink && ["", "o"])[1];
        return "-" + e + "-"
    }(),
    s = function() {
        var t, e = document.createElement("fakeelement"),
            i = {
                transition: "transitionend",
                OTransition: "oTransitionEnd",
                MozTransition: "transitionend",
                WebkitTransition: "webkitTransitionEnd"
            };
        for (t in i)
            if (void 0 !== e.style[t]) return i[t]
    }(),
    r = {
        transition: o + "transition",
        transform: o + "transform"
    },
    h = function() {},
    a = function(t) {
        var i = {
            duration: 200,
            tolerance: 50,
            time: 200,
            dir: 1,
            right: 0,
            left: 0
        };
        t = e(i, t || {}), this.duration = t.duration, this.tolerance = t.tolerance, this.time = t.time, this.width = t.left || t.right, this.elem = t.elem, this.list = t.list, this.dir = t.dir, this.group = t.group, this.id = a.elemId++, this.onOpen = "function" == typeof t.onOpen ? t.onOpen : h, this.onClose = "function" == typeof t.onClose ? t.onClose : h, this.right = t.right, this.left = t.left, (t.right > 0 && t.tolerance > t.right || t.left > 0 && t.tolerance > t.left) && console.warn("tolerance must be less then left and right")
    };
a._elems = [], a.groupCounter = 0, a.elemId = 0, a.init = function(t) {
    a.groupCounter++;
    var i = document.querySelectorAll(t.query),
        n = [];
    return delete t.query, [].forEach.call(i, function(i) {
        var o = e({
            elem: i,
            group: a.groupCounter
        }, t);
        n.push(new a(o))
    }), a._bindEvents(), a._elems = a._elems.concat(n), 1 === n.length ? n[0] : n
}, a._closeAll = function(t) {
    a._elems.forEach(function(e) {
        e.group === t && e.close(!0)
    })
}, a.prototype.transitionEnd = function(t, e) {
    function i() {
        e.call(n), t.removeEventListener(s, i)
    }
    var n = this;
    t.addEventListener(s, i)
}, a.prototype.touchStart = function(t) {
    var e = t.changedTouches[0];
    1 === t.touches.length && (this.touchId = e.identifier, this.x = e.pageX, this.y = e.pageY, this.startTime = new Date, this.resetValue(), this.list ? a._closeAll(this.group) : this.close(!0))
}, a.prototype.touchMove = function(t) {
    var e = t.changedTouches[0];
    this.isValidTouch(t) && (this.delta = e.pageX - this.x, this.dir = this.delta < 0 ? -1 : 1, this.width = this.delta < 0 ? this.right : this.left, this.defineUserAction(e), this.startSwipe && (this.move(), t.preventDefault()))
}, a.prototype.touchEnd = function(t) {
    this.isValidTouch(t, !0) && this.startSwipe && (this.dir * this.delta > this.tolerance || new Date - this.startTime < this.time ? this.open() : this.close(), t.stopPropagation(), t.preventDefault())
}, a.prototype.open = function(t) {
    this.animation(this.dir * this.width), this.swiped = !0, t || this.transitionEnd(this.elem, this.onOpen), this.resetValue()
}, a.prototype.close = function(t) {
    this.animation(0), this.swiped = !1, t || this.transitionEnd(this.elem, this.onClose), this.resetValue()
}, a.prototype.toggle = function() {
    this.swiped ? this.close() : this.open()
}, a.prototype.resetValue = function() {
    this.startSwipe = !1, this.startScroll = !1, this.delta = 0
}, a._bindEvents = function() {
    return a.eventBinded ? !1 : (t(n.move, "touchMove"), t(n.end, "touchEnd"), t(n.start, "touchStart"), void(a.eventBinded = !0))
}, a.prototype.defineUserAction = function(t) {
    var e = 10,
        i = 10;
    Math.abs(this.y - t.pageY) > i && !this.startSwipe ? this.startScroll = !0 : Math.abs(this.delta) > e && !this.startScroll && (this.startSwipe = !0)
}, a.prototype.isValidTouch = function(t, e) {
    var i = e ? "changedTouches" : "targetTouches";
    return t[i][0].identifier === this.touchId
}, a.prototype.move = function() {
    if (this.dir > 0 && (this.delta < 0 || 0 === this.left) || this.dir < 0 && (this.delta > 0 || 0 === this.right)) return !1;
    var t = Math.abs(this.delta);
    t > this.width && (this.delta = this.dir * (this.width + (t - this.width) / 8)), this.animation(this.delta, 0)
}, a.prototype.animation = function(t, e) {
    e = void 0 === e ? this.duration : e, this.elem.style.cssText = r.transition + ":" + r.transform + " " + e + "ms; " + r.transform + ":translate3d(" + t + "px, 0px, 0px)"
}, a.prototype.destroy = function(t) {
    var e = this.id;
    a._elems.forEach(function(t, i) {
        t.id === e && a._elems.splice(i, 1)
    }), t && this.elem.parentNode.removeChild(this.elem)
}, window.Swiped = a
}();
!函数(){
函数t(t,e){
文件.附录列表器(t,函数(t){
a、 _elems.forEach(功能(i){
对于(var n=t.target;n;){
如果(n==i.elem)返回i[e](t),!1;
n=n.parentNode
}
返回!1
})
})
}
函数e(){
var t=[].shift.call(参数),
e=参数[0];
对于(e中的风险值i)e.hasOwnProperty(i)&(t[i]=e[i]);
返回t
}
var i=window.navigator.msPointerEnabled,
n={
开始:i?“MSPointerDown”:“touchstart”,
移动:我?“MSPointerMove”:“触摸移动”,
结束:我?“MSPointerUp”:“touchend”
},
o=函数(){
var t=window.getComputedStyle(document.documentElement,“”),
e=(Array.prototype.slice.call(t).join(“”.match(/-(moz | webkit | ms)-/)| |“”===t.OLink&&[“”,“o”])[1];
返回“-”+e+“-”
}(),
s=函数(){
var t,e=document.createElement(“fakeelement”),
i={
过渡:“transitionend”,
OTransition:“oTransitionEnd”,
MozTransition:“transitionend”,
WebKittTransition:“WebKittTransitionEnd”
};
对于(t in i)
if(void 0!==e.style[t])返回i[t]
}(),
r={
过渡:o+“过渡”,
转换:o+“转换”
},
h=函数(){},
a=函数(t){
变量i={
持续时间:200,
公差:50,
时间:200,,
董事:1,
右:0,,
左:0
};
t=e(i,t | |{}),this.duration=t.duration,this.tolerance=t.tolerance,this.time=t.time,this.width=t.left | | | t.right,this.elem=t.elem,this.list=t.list=t.dir,this.group=t.group,this.id=a.elemId++,this.onOpen=“function”==typeof t.onOpen?t.onOpen:h,this.onClose=“function”==t.onClose?t.onClose的类型:h,this.right=t.right,this.left=t.left,(t.right>0&&t.tolerance>t.right | | t.left>0&&t.tolerance>t.left)&&console.warn(“公差必须小于左和右”)
};
a、 _elems=[],a.groupCounter=0,a.elemId=0,a.init=function(t){
a、 groupCounter++;
var i=document.querySelectorAll(t.query),
n=[];
返回delete t.query,[].forEach.call(i,函数(i){
var o=e({
我,
组:a.groupCounter
},t);
n、 推送(新a(o))
}),a._bindEvents(),a._elems=a._elems.concat(n),1==n.length?n[0]:n
},a.。_closeAll=函数(t){
a、 _elems.forEach(功能(e){
e、 组===t&&e.close(!0)
})
},a.prototype.transitionEnd=函数(t,e){
函数i(){
e、 调用(n),t.removeEventListener(s,i)
}
var n=这个;
t、 增补列表器(s,i)
},a.prototype.touchStart=函数(t){
var e=t.changedTouches[0];
1===t.touchs.length&&(this.touchId=e.identifier,this.x=e.pageX,this.y=e.pageY,this.startTime=new Date,this.resetValue(),this.list?a.。_closeAll(this.group):this.close(!0))
},a.prototype.touchMove=函数(t){
var e=t.changedTouches[0];
this.isValidTouch(t)和(this.delta=e.pageX-this.x,this.dir=this.delta<0?-1:1,this.width=this.delta<0?this.right:this.left,this.defineUserAction(e),this.startSwipe和(this.move(),t.preventDefault())
},a.prototype.touchEnd=函数(t){
this.isValidTouch(t,!0)和&this.startSwipe&&this.dir*this.delta>this.tolerance | |新日期-this.startTimei&&!this.startSwipe?this.startScroll=!0:Math.abs(this.delta)>e&!this.startScroll&&(this.startSwipe=!0)
},a.prototype.isValidTouch=函数(t,e){
变量i=e?“更改触摸”:“目标触摸”;
返回t[i][0]。标识符===this.touchId
},a.prototype.move=函数(){
如果(this.dir>0&(this.delta<0 | | 0==this.left)| | this.dir<0&(this.delta>0 | | 0==this.right))返回!1;
var t=Math.abs(this.delta);
t>this.width&&(this.delta=this.dir*(this.width+(t-this.width)/8)),this.animation(this.delta,0)
},a.prototype.animation=函数(t,e){
e=void 0==e?this.duration:e,this.elem.style.cssText=r.transition+“:”+r.transform+“+e+”ms;“+r.transform+”:translate3d(“+t+”px,0px,0px)”
},a.prototype.destroy=函数(t){
var e=this.id;
a、 _elems.forEach(函数(t,i){
t、 id==e&&a.元素拼接(i,1)
}),t&&this.elem.parentNode.removeChild(this.elem)
},window.Swiped=a
}();
!函数(){
函数t(t,e){
document.add
! function() {
function t(t, e) {
    document.addEventListener(t, function(t) {
        a._elems.forEach(function(i) {
            for (var n = t.target; n;) {
                if (n === i.elem) return i[e](t), !1;
                n = n.parentNode
            }
            return !1
        })
    })
}

function e() {
    var t = [].shift.call(arguments),
        e = arguments[0];
    for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
    return t
}
var i = window.navigator.msPointerEnabled,
    n = {
        start: i ? "MSPointerDown" : "touchstart",
        move: i ? "MSPointerMove" : "touchmove",
        end: i ? "MSPointerUp" : "touchend"
    },
    o = function() {
        var t = window.getComputedStyle(document.documentElement, ""),
            e = (Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/) || "" === t.OLink && ["", "o"])[1];
        return "-" + e + "-"
    }(),
    s = function() {
        var t, e = document.createElement("fakeelement"),
            i = {
                transition: "transitionend",
                OTransition: "oTransitionEnd",
                MozTransition: "transitionend",
                WebkitTransition: "webkitTransitionEnd"
            };
        for (t in i)
            if (void 0 !== e.style[t]) return i[t]
    }(),
    r = {
        transition: o + "transition",
        transform: o + "transform"
    },
    h = function() {},
    a = function(t) {
        var i = {
            duration: 200,
            tolerance: 50,
            time: 200,
            dir: 1,
            right: 0,
            left: 0
        };
        t = e(i, t || {}), this.duration = t.duration, this.tolerance = t.tolerance, this.time = t.time, this.width = t.left || t.right, this.elem = t.elem, this.list = t.list, this.dir = t.dir, this.group = t.group, this.id = a.elemId++, this.onOpen = "function" == typeof t.onOpen ? t.onOpen : h, this.onClose = "function" == typeof t.onClose ? t.onClose : h, this.right = t.right, this.left = t.left, (t.right > 0 && t.tolerance > t.right || t.left > 0 && t.tolerance > t.left) && console.warn("tolerance must be less then left and right")
    };
a._elems = [], a.groupCounter = 0, a.elemId = 0, a.init = function(t) {
    a.groupCounter++;
    var i = document.querySelectorAll(t.query),
        n = [];
    return delete t.query, [].forEach.call(i, function(i) {
        var o = e({
            elem: i,
            group: a.groupCounter
        }, t);
        n.push(new a(o))
    }), a._bindEvents(), a._elems = a._elems.concat(n), 1 === n.length ? n[0] : n
}, a._closeAll = function(t) {
    a._elems.forEach(function(e) {
        e.group === t && e.close(!0)
    })
}, a.prototype.transitionEnd = function(t, e) {
    function i() {
        e.call(n), t.removeEventListener(s, i)
    }
    var n = this;
    t.addEventListener(s, i)
}, a.prototype.touchStart = function(t) {
    var e = t.changedTouches[0];
    1 === t.touches.length && (this.touchId = e.identifier, this.x = e.pageX, this.y = e.pageY, this.startTime = new Date, this.resetValue(), this.list ? a._closeAll(this.group) : this.close(!0))
}, a.prototype.touchMove = function(t) {
    var e = t.changedTouches[0];
    this.isValidTouch(t) && (this.delta = e.pageX - this.x, this.dir = this.delta < 0 ? -1 : 1, this.width = this.delta < 0 ? this.right : this.left, this.defineUserAction(e), this.startSwipe && (this.move(), t.preventDefault()))
}, a.prototype.touchEnd = function(t) {
    this.isValidTouch(t, !0) && this.startSwipe && (this.dir * this.delta > this.tolerance || new Date - this.startTime < this.time ? this.open() : this.close(), t.stopPropagation(), t.preventDefault())
}, a.prototype.open = function(t) {
    this.animation(this.dir * this.width), this.swiped = !0, t || this.transitionEnd(this.elem, this.onOpen), this.resetValue()
}, a.prototype.close = function(t) {
    this.animation(0), this.swiped = !1, t || this.transitionEnd(this.elem, this.onClose), this.resetValue()
}, a.prototype.toggle = function() {
    this.swiped ? this.close() : this.open()
}, a.prototype.resetValue = function() {
    this.startSwipe = !1, this.startScroll = !1, this.delta = 0
}, a._bindEvents = function() {
    return a.eventBinded ? !1 : (t(n.move, "touchMove"), t(n.end, "touchEnd"), t(n.start, "touchStart"), void(a.eventBinded = !0))
}, a.prototype.defineUserAction = function(t) {
    var e = 10,
        i = 10;
    Math.abs(this.y - t.pageY) > i && !this.startSwipe ? this.startScroll = !0 : Math.abs(this.delta) > e && !this.startScroll && (this.startSwipe = !0)
}, a.prototype.isValidTouch = function(t, e) {
    var i = e ? "changedTouches" : "targetTouches";
    return t[i][0].identifier === this.touchId
}, a.prototype.move = function() {
    if (this.dir > 0 && (this.delta < 0 || 0 === this.left) || this.dir < 0 && (this.delta > 0 || 0 === this.right)) return !1;
    var t = Math.abs(this.delta);
    t > this.width && (this.delta = this.dir * (this.width + (t - this.width) / 8)), this.animation(this.delta, 0)
}, a.prototype.animation = function(t, e) {
    e = void 0 === e ? this.duration : e, this.elem.style.cssText = r.transition + ":" + r.transform + " " + e + "ms; " + r.transform + ":translate3d(" + t + "px, 0px, 0px);" + " " + "z-index: 10000;"
}, a.prototype.destroy = function(t) {
    var e = this.id;
    a._elems.forEach(function(t, i) {
        t.id === e && a._elems.splice(i, 1)
    }), t && this.elem.parentNode.removeChild(this.elem)
}, window.Swiped = a
}();