Namespace Events
Defined in: events.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Brightcove App Cloud events that are added to the jQuery object.
|
| Event Attributes | Event Name and Description |
|---|---|
|
swipe()
On touch platforms, users can provide input with a 'swipe' gesture.
|
|
|
tap()
Tap is an event that represents a user 'tapping' on an element.
|
Namespace Detail
Events
Brightcove App Cloud events that are added to the jQuery object. This enables you to
use the jQuery event attachment functions of (on) with this set of events.
These events will work across both desktops and mobile devices.
Event Detail
swipe()
On touch platforms, users can provide input with a 'swipe' gesture. For example, a user placing their finger on the screen
and dragging it. When the
swipe event is fired, the type of event will be swipe. An additional parameter, either swipeRight or swipeLeft, will be passed to
any bound functions. This additional parameter can be used to understand in which
direction the user is swiping.
$('.image').on( 'swipe', function(evt, direction) {
if( direction === 'swipeRight' ) {
handleSwipeRight( this );
} else {
handleSwipeLeft( this );
}
});
tap()
Tap is an event that represents a user 'tapping' on an element. It is recommended to use
tap rather than click
as it eliminates 300ms of delay that binding to a click event introduces on some platforms. On non-touch
devices, the tap event is equivalent to click. This means binding to tap will work across both
touch and non-touch devices.
$( '#hello-button' ).on( 'tap', function() {
alert('Hello there!');
});