|
@@ -282,31 +282,35 @@ function initClick() {
|
|
|
var that = this
|
|
|
tmerSw = setTimeout(function() {
|
|
|
//禁用轮播图
|
|
|
- util.variable['swiper'].disable()
|
|
|
- initX = $(that)[0].offsetLeft + $(".back").clientWidth + $(that)[0].clientWidth / 2
|
|
|
- $(".cont").css({ "left": initX, "top": "90%" })
|
|
|
- $(".cont").css("display", "block").empty()
|
|
|
- // 将长按的元素复制到容器中
|
|
|
- var copyEl = $.clone($(that)[0])
|
|
|
- $(".cont").append(copyEl)
|
|
|
- // 获取容器的初始位置值
|
|
|
- // 移动容器
|
|
|
+ // util.variable['swiper'].disable();
|
|
|
+ initX = $(that)[0].offsetLeft + $(".back").clientWidth + $(that)[0].clientWidth / 2;
|
|
|
+ $(".cont").css({ "left": initX, "top": "90%" });
|
|
|
+ $(".cont").css("display", "block").empty();
|
|
|
+ // 将长按的元素复制到容器中
|
|
|
+ var copyEl = $.clone($(that)[0]);
|
|
|
+ $(".cont").append(copyEl);
|
|
|
+ // 获取容器的初始位置值
|
|
|
+ // 移动容器
|
|
|
that.addEventListener("touchmove", function(e1) {
|
|
|
- swX = e1.changedTouches[0].clientX
|
|
|
- swY = e1.changedTouches[0].clientY
|
|
|
- $(".cont").css({ "left": swX, "top": swY })
|
|
|
+ swX = e1.changedTouches[0].clientX;
|
|
|
+ swY = e1.changedTouches[0].clientY;
|
|
|
+ $(".cont").css({ "left": swX, "top": swY });
|
|
|
})
|
|
|
- idenSw = 1
|
|
|
- }, 500)
|
|
|
+ idenSw = 1;
|
|
|
+ }, 500);
|
|
|
|
|
|
util.variable['swiper'].on("touchMove", function(swiper, e) {
|
|
|
- that.removeEventListener("touchmove")
|
|
|
- clearTimeout(tmerSw)
|
|
|
+ that.removeEventListener("touchmove", function(e1) {
|
|
|
+ swX = e1.changedTouches[0].clientX;
|
|
|
+ swY = e1.changedTouches[0].clientY;
|
|
|
+ $(".cont").css({ "left": swX, "top": swY });
|
|
|
+ })
|
|
|
+ clearTimeout(tmerSw);
|
|
|
})
|
|
|
});
|
|
|
$(".swiper-wrapper").on("touchend", '.slide-item', function() {
|
|
|
// 判断是否长按
|
|
|
- clearTimeout(tmerSw)
|
|
|
+ clearTimeout(tmerSw);
|
|
|
if (idenSw == 0) {
|
|
|
switchSwiper($(this).attr('data-si'));
|
|
|
} else {
|
|
@@ -326,8 +330,8 @@ function initClick() {
|
|
|
$(".cont").css({ "display": "none" })
|
|
|
}
|
|
|
//启用轮播图
|
|
|
- util.variable['swiper'].enable()
|
|
|
- idenSw = 0
|
|
|
+ // util.variable['swiper'].enable();
|
|
|
+ idenSw = 0;
|
|
|
});
|
|
|
|
|
|
var frameBh = 0
|