V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
tearsinchina
V2EX  ›  问与答

求个在android的浏览器下,连续几个单元格连线的js代码,研究了3天了,没有一点儿进展

  •  
  •   tearsinchina · 2012 年 8 月 1 日 · 3184 次点击
    这是一个创建于 4916 天前的主题,其中的信息可能已经有所发展或是发生改变。
    情景如下:

    26个字母打散,分布在26个单元格里,用户使用android下的浏览器打开这个页面后 ,当用户用手指选中其中一个字幕并按住不放然后移动手指,这样,手指移动过的单元格都会触发一个事件。


    问题:

    用过jqueryMobile的VMouseMove和vmouseover了,用户只有在再次放下手指的时候才会触发,这意味着按住不放连续移动,是触发不了这个事件的,



    求高手
    5 条回复    1970-01-01 08:00:00 +08:00
    WarWithinMe
        1
    WarWithinMe  
       2012 年 8 月 1 日
    直接用touchstart, touchmove, touchend就能实现。。。

    BTW, jqueryMobile有多大的体积?
    tearsinchina
        2
    tearsinchina  
    OP
       2012 年 8 月 1 日
    @WarWithinMe 你可以试试,放2个div,在每个div上bind上touchstart touchmove事件,移动到第2个div时候是不会触发touchevent的
    benzhe
        3
    benzhe  
       2012 年 8 月 1 日
    你应该把事件绑定在 container 上,而不是单元格吧?
    WarWithinMe
        4
    WarWithinMe  
       2012 年 8 月 2 日
    我也觉得是直接绑定到container里面,然后计算落在哪个地方。。。
    tearsinchina
        5
    tearsinchina  
    OP
       2012 年 8 月 3 日
    it is ok, i setup touchmove on the table ,then get cell id by calculating pageX and pageY
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2842 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 05:49 · PVG 13:49 · LAX 21:49 · JFK 00:49
    ♥ Do have faith in what you're doing.