html滚动文字并手势控制,在html文件之间滑动手势

这是我用于某些应用程序的触摸屏拖动/滑动修复。

(function(b)

{

b.support.touch = "ontouchend" in document;

if (!b.support.touch)

{

return;

}

var c = b.ui.mouse.prototype,

e = c._mouseInit,

a;

function d(g, h)

{

if (g.originalEvent.touches.length > 1)

{

return;

}

g.preventDefault();

var i = g.originalEvent.changedTouches[0],

f = document.createEvent("MouseEvents");

f.initMouseEvent(h, true, true, window, 1, i.screenX, i.screenY, i.clientX, i.clientY, false, false, false, false, 0, null);

g.target.dispatchEvent(f);

}

c._touchStart = function(g)

{

var f = this;

if (a || !f._mouseCapture(g.originalEvent.changedTouches[0]))

{

return;

}

a = true;

f._touchMoved = false;

d(g, "mouseover");

d(g, "mousemove");

d(g, "mousedown");

};

c._touchMove = function(f)

{

if (!a)

{

return;

}

this._touchMoved = true;

d(f, "mousemove");

};

c._touchEnd = function(f)

{

if (!a)

{

return;

}

d(f, "mouseup");

d(f, "mouseout");

if (!this._touchMoved)

{

d(f, "click");

}

a = false;

};

c._mouseInit = function()

{

var f = this;

f.element.bind("touchstart", b.proxy(f, "_touchStart")).bind("touchmove", b.proxy(f, "_touchMove")).bind("touchend", b.proxy(f, "_touchEnd"));

e.call(f);

};

})(jQuery);

正如凯文写的那样,你可以使用ajax加载你准备好的其他两个页面,然后使用滑动触发器将它们设置为随机播放。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值