{"action":"created","issue":{"url":"https://api.github.com/repos/kenwheeler/slick/issues/2352","repository_url":"https://api.github.com/repos/kenwheeler/slick","labels_url":"https://api.github.com/repos/kenwheeler/slick/issues/2352/labels{/name}","comments_url":"https://api.github.com/repos/kenwheeler/slick/issues/2352/comments","events_url":"https://api.github.com/repos/kenwheeler/slick/issues/2352/events","html_url":"https://github.com/kenwheeler/slick/issues/2352","id":158358963,"number":2352,"title":"How to get direction of slide change?","user":{"login":"Skinwalker","id":2900602,"avatar_url":"https://avatars.githubusercontent.com/u/2900602?v=3","gravatar_id":"","url":"https://api.github.com/users/Skinwalker","html_url":"https://github.com/Skinwalker","followers_url":"https://api.github.com/users/Skinwalker/followers","following_url":"https://api.github.com/users/Skinwalker/following{/other_user}","gists_url":"https://api.github.com/users/Skinwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/Skinwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skinwalker/subscriptions","organizations_url":"https://api.github.com/users/Skinwalker/orgs","repos_url":"https://api.github.com/users/Skinwalker/repos","events_url":"https://api.github.com/users/Skinwalker/events{/privacy}","received_events_url":"https://api.github.com/users/Skinwalker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-03T12:45:09Z","updated_at":"2016-06-03T13:49:42Z","closed_at":"2016-06-03T13:49:42Z","body":"Im trying to get the direction of the slide change via beforeChange Event.\r\n\r\nWhen I try to get the value from\r\n**slick.direction**\r\nor\r\n**slick.currentDirection**\r\nthe value doesn't change when i click the slick arrows - currentDirection changes when i change the slide via touchmove.\r\n\r\nIs this a bug? Or does anybody knows a better way to get the direction?\r\n\r\nOn the change i wanna add a class to the current and the prev / next slide for a custom effect.\r\n\r\nHeres a Pen where you can see the issue on the console output ...\r\n[http://codepen.io/anon/pen/qNdqLL](http://codepen.io/anon/pen/qNdqLL)"},"comment":{"url":"https://api.github.com/repos/kenwheeler/slick/issues/comments/223583663","html_url":"https://github.com/kenwheeler/slick/issues/2352#issuecomment-223583663","issue_url":"https://api.github.com/repos/kenwheeler/slick/issues/2352","id":223583663,"user":{"login":"leggomuhgreggo","id":2213636,"avatar_url":"https://avatars.githubusercontent.com/u/2213636?v=3","gravatar_id":"","url":"https://api.github.com/users/leggomuhgreggo","html_url":"https://github.com/leggomuhgreggo","followers_url":"https://api.github.com/users/leggomuhgreggo/followers","following_url":"https://api.github.com/users/leggomuhgreggo/following{/other_user}","gists_url":"https://api.github.com/users/leggomuhgreggo/gists{/gist_id}","starred_url":"https://api.github.com/users/leggomuhgreggo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leggomuhgreggo/subscriptions","organizations_url":"https://api.github.com/users/leggomuhgreggo/orgs","repos_url":"https://api.github.com/users/leggomuhgreggo/repos","events_url":"https://api.github.com/users/leggomuhgreggo/events{/privacy}","received_events_url":"https://api.github.com/users/leggomuhgreggo/received_events","type":"User","site_admin":false},"created_at":"2016-06-03T13:49:42Z","updated_at":"2016-06-03T13:49:42Z","body":"Hey @Skinwalker. Those keys are only used for swipe and if infinite is false and autoplay is true--I can see how it's a little confusing. The only way I know of is to compare the value of the previous slide to the next slide, with special attention paid to infinite transitions. Hope that helps! "}}
{"actor":{"display_login":"leggomuhgreggo"}}