darsain / sly

JavaScript library for one-directional scrolling with item based navigation support.
http://darsa.in/sly
2.87k stars 497 forks source link

mousedown event of next page button #197

Closed relmxpillar closed 9 years ago

relmxpillar commented 9 years ago

Hi,

I am trying to add "activatePageOn: 'mousedown touchstart'" to getting a more responsive touch experience for the "prevPage/nextPage" button, it's not working but the navigation list (the bullets).

I am using the following to test.

Cycling by pages http://darsa.in/sly/examples/horizontal.html

It's not support?

Many thanks.

darsain commented 9 years ago

The activatePageOn option affects only pagesBar, not navigation buttons, which work on clicks.

But you can still implement it yourself using Sly API:

$('.nextpage').on('mousedown', function () {
  sly.nextPage();
})
relmxpillar commented 9 years ago

Hi darsain,

It works, many thanks!