Saturday, February 18, 2017

Framework7 - Tap Hold Event

Description

Tap hold event is used to trigger (enable) after a sustained and complete the touch event so only, it is called tap hold event. The Tab Hold is a built-in Fast Clicks library.
The following parameters are use to disabled, could be enabled and configured by default:

S.N.Parameter & DescriptionTypeDefault
1 tapHold
To enable tap hold events when it is set to true.
boolean false
2 tapHoldDelay
It specifies the duration of holding the tap before triggering taphold event on the target element.
number 750
3 tapHoldPreventClicks
The tap hold event will not be fired after clicking the event.
boolean true
Following code is used for enable tap hold events
var myApp = new Framework7({
  tapHold: true //enable tap hold events
});
 
var $$ = Dom7;
 
$$('.some-link').on('taphold', function () {
  myApp.alert('Tap hold fired!');
});

No comments:

Post a Comment