conditional javascript code not executing

后端 未结 4 444
没有蜡笔的小新
没有蜡笔的小新 2021-01-26 14:47

Does anyone know why this code might not work? touchmove and touchend do not execute only touchstart because that\'s a seperate event and function :)

$(\'input\'         


        
4条回答
  •  情深已故
    2021-01-26 15:23

    I think this would work

    $('x').live("ontouchmove, ontouchend", function (e) { 
      //do stuff
      if (e.type == 'ontouchmove'){
        //do stuff
      }
      else{
        //do stuff
      }
    });
    

提交回复
热议问题