简体   繁体   English

使用“ ontouchstart”事件调用/调用模式

[英]Invoking/calling a modal using a “ontouchstart” event

In a button, a modal is called using data-target of a button, but here since I have a touch screen I want to use ontouchstart (when touched on button, not clicked) to call the modal. 在按钮中,使用按钮的数据目标调用模式,但是在这里,因为我有触摸屏,所以我想使用ontouchstart(当触摸按钮而不是单击按钮时)来调用模式。

Any suggestion how can I implement this? 有什么建议我该如何实施?

This is how I am calling the modal currently: (modal id is myModal) 这是我当前如何调用模式的方式:(模式ID为myModal)

Please suggest how can I call the div using touch functionality. 请提出如何使用触摸功能致电div的建议。

finally I invokes a modal using a function of calling modal. 最后,我使用调用模式的功能来调用模式。 step1: called the function : ontouchstart=myfunction() step2: called the modal in the function myfunction(){$scope.openModa = function(){$('#myModalname').modal('show');};} 步骤1:调用函数:ontouchstart = myfunction()步骤2:在函数myfunction(){$ scope.openModa = function(){$('#myModalname')。modal('show');};}中调用模态

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM