When using Iscroll on mobile, the touch event binding is enabled by default and is sensitive to touch events. If the finger touches the connection, the browser will open the connection operation by default if the slide is not finished. This will not complete the normal scrolling.
Iscroll design idea is in a page completes the operation, does not have the new opening tab to open the page the way, then both uses Iscroll and realizes the new page to open function how to do?
The time.qq.com approach is that the entire page does not use a tag, and is completely converted using a script-manipulation interface.
http://h5.m.sohu.com/'s approach is to use a and HREF,HREF values that are hashed and will not cause new pages to open
http://ipad.hao123.com/#index is handled in a very special way, using the dataset API and window.open
<a ontouchmove= "This.s=1" ontouchend= "THIS.S | | window.open (this.dataset.href), this.s=0 "target=" _blank "data-href=" "Http://www.hao123.com/topic/pig" > The Mystery of the Dead pig in Huangpu River </a>
Check the scrolling state to determine whether the connection is turned on when a flag,touchend is triggered when Touchmove is fired. This avoids the misoperation caused by scrolling and enables you to open a new page.
Author: cnblogs Small Jade Watermelon
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/script/