From 953b9f8da41e8a2a2d6834d32923fce43d81f632 Mon Sep 17 00:00:00 2001 From: Antonio Laguna Date: Wed, 19 Apr 2017 18:02:12 +0200 Subject: [PATCH] Updated Core API (markdown) --- Core-API.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Core-API.md b/Core-API.md index 3764146..79cb075 100644 --- a/Core-API.md +++ b/Core-API.md @@ -116,4 +116,24 @@ These properties are inside of the WebSlides instance and they could be useful t - `options`: An object with all the options given to the constructor (as seen above). - `initialised`: A Boolean indicating whether WebSlides has finished the initialisation or not. +### Events + +WebSlides fires events on the WebSlide's element. + +#### `ws:init` + +Called once WebSlides has been initialised and the `initialised` flag is set to `true`. This happens _after_ all plugins have been created and all Slides have been parsed (in that order). + +#### `ws:slide-change` + +Called once the slide **has finished** transitioning into view. The `event.detail` contains the following information: + +```javascript +{ + slides: Number, // Number of slides on WebSlides (this wont change) + currentSlide0: Number, // Current slide index (0 based) + currentSlide: Number // Current slide index +} +``` + ## `Slide` class \ No newline at end of file