1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 18:29:39 +02:00
Oinktube/node_modules/flickity/sandbox/js/basic.js
2023-06-30 09:56:13 -03:00

27 lines
684 B
JavaScript

let flky = window.flky = new Flickity('#full-width');
// flky.on( 'dragMove', function( event, pointer ) {
// console.log( event.type, pointer.pageX, pointer.pageY );
// });
flky.on( 'select', function() {
console.log( 'selected', flky.selectedIndex );
} );
flky.on( 'settle', function() {
console.log( 'settled', flky.x );
} );
let halfWidthflky = new Flickity( '#half-width', {
cellAlign: 'left',
} );
halfWidthflky.on( 'staticClick', function( event, pointer, cellIndex, cellElement ) {
console.log( cellIndex, cellElement );
} );
new Flickity( '#gallery3', {
} );
document.querySelector('#gallery3 button').onclick = function() {
console.log('button click');
};