metafizzy / flickity-docs

:memo: documentation for Flickity
28 stars 8 forks source link

'settle' example code listed incorrectly. #2

Closed dom-turnbull closed 9 years ago

dom-turnbull commented 9 years ago

Under http://flickity.metafizzy.co/api.html#events-demo, the following code is listed:

// jQuery
$gallery.on( 'select', function() {
  console.log( 'Flickity settled at ' + flkty.selectedIndex )
})
// vanilla JS
flkty.on( 'select', function() {...})

Which is actually the 'select' event so when it is used, it fires too early and breaks code.

Resolved: Sorted it by just changing 'select' to 'settle'.

desandro commented 9 years ago

Thanks for catching this! If you like stickers, email me yo@metafizzy so I can send some your way.