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

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

  •  
  •   tearsinchina · 2012-08-01 18:28:34 +08:00 · 2770 次点击
    这是一个创建于 4291 天前的主题,其中的信息可能已经有所发展或是发生改变。
    情景如下:

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


    问题:

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



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

    BTW, jqueryMobile有多大的体积?
    tearsinchina
        2
    tearsinchina  
    OP
       2012-08-01 23:03:20 +08:00
    @WarWithinMe 你可以试试,放2个div,在每个div上bind上touchstart touchmove事件,移动到第2个div时候是不会触发touchevent的
    benzhe
        3
    benzhe  
       2012-08-01 23:11:21 +08:00
    你应该把事件绑定在 container 上,而不是单元格吧?
    WarWithinMe
        4
    WarWithinMe  
       2012-08-02 22:50:03 +08:00
    我也觉得是直接绑定到container里面,然后计算落在哪个地方。。。
    tearsinchina
        5
    tearsinchina  
    OP
       2012-08-03 09:58:10 +08:00
    it is ok, i setup touchmove on the table ,then get cell id by calculating pageX and pageY
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2255 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 05:41 · PVG 13:41 · LAX 22:41 · JFK 01:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.