new Responsiville.Slideshow(options)
Creates and initialises the slideshow.
Name | Type | Description |
---|---|---|
options |
Object | The initialisation options of the module. |
- License:
- Nevma Copyright (c) http://www.nevma.gr
Properties:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | The options that define the object
behaviour.
Properties
|
Fires:
Extends
Members
-
staticResponsiville.Slideshow.AUTO_RUN
-
Properties:
Name Type Description AUTO_RUN
boolean Controls whether this module should run by default, without the developer calling it, using its default settings. Defaults to true. -
staticResponsiville.Slideshow.defaults
-
Properties:
Name Type Description defaults
Object Default values for this module settings.
Methods
-
staticResponsiville.Slideshow.autoRun(){void}
-
Runs through the page and searches for elements that apply to the current module in order to apply it to them automatically. Useful for automatically creating elements with this module's behaviour just by setting up the predefined classes and data attributes in HTML elements of the page.
Returns:
Type Description void -
adjustContainer(){void}
-
Adjusts the slideshow container to the correct height.
Fires:
Returns:
Type Description void -
afterSlideShown(index){void}
-
Runs when the process of showing a slide is complete, thus the slide is fully shown, no matter what the effect was or whether the process took zero or more time.
Name Type Description index
int The index of the slide that was shown. Returns:
Type Description void -
bulletMouseClick(){void}
-
Event handler for when a user clicks on a slideshow navigation bullet.
Returns:
Type Description void -
calculateNext(){int}
-
Calculates the index of the next slide to be shown based on the current slide and the slideshow direction.
Returns:
Type Description int The index of the next slide to be shown. -
containerMouseEnter(){void}
-
Event handler for when a user's mouse enters their mouse inside the area of the slideshow container.
Returns:
Type Description void -
containerMouseLeave(){void}
-
Event handler for when a user's mouse leaves the area of the slideshow container.
Returns:
Type Description void -
disable(){void}
-
Disable slideshow. Means it completely invalidates the slideshow behaviour trying to restore things to their previous state, before the slideshow was enabled in the first place. Particularly useful when one wants to enable and disable the slideshow at certain responsive breakpoints.
Fires:
Returns:
Type Description void -
enable(){void}
-
Enables the slideshow. Means it creates the slideshow functionality on the selected containers and slides from scratch. Particularly useful when one wants to enable and disable the slideshow at certain responsive breakpoints.
Fires:
Returns:
Type Description void -
enableOnFirstSlideLoad(){void}
-
Enable the slideshow when the images of the first slide have loaded.
Returns:
Type Description void -
hide(index, next, immediately){void}
-
Hides the given slide.
Name Type Description index
int The index of the slide to hide. next
int The index of the slide to be shown while this slide is being hidden. Useful for cases where the transition from one slide to the other depends on the position of both slides. immediately
boolean Whether to hide the slide immediately, without using any transition effects, or not. Fires:
Returns:
Type Description void -
hideAll(immediately){void}
-
Hides all slides simultaneously.
Name Type Description immediately
boolean Whether to hide the slides immediately, without using any transition effects, or not. Returns:
Type Description void -
imageLoaded(){void}
-
Runs when an image -any image- inside a slide has loaded.
Returns:
Type Description void -
next(){void}
-
Selects and shows the next slide in the literal sense, the one on the right of the current slide.
Returns:
Type Description void -
nextMouseClick(){void}
-
Event handler for when a user clicks on a slideshow next link.
Returns:
Type Description void -
pause(){void}
-
Pauses the slideshow.
Fires:
Returns:
Type Description void -
previous(){void}
-
Selects and shows the previous slide in the literal sense, the one on the left of the current slide.
Returns:
Type Description void -
previousMouseClick(){void}
-
Event handler for when a user clicks on a slideshow previous link.
Returns:
Type Description void -
select(index){void}
-
Sets the given slide as selected and triggers the command to show it.
Name Type Description index
int The index of the slide to set as selected. Returns:
Type Description void -
selectNext(){void}
-
Selects and shows the next slide in row.
Returns:
Type Description void -
setupEvents(){void}
-
Sets up slideshow events when the slideshow is initialised. Gets called automatically by the constructor.
Returns:
Type Description void -
show(index, previous){void}
-
Shows the given slide.
Name Type Description index
int The index of the slide to show. previous
int The index of the slide previously shown. Fires:
- Responsiville.Slideshow#event:slideShowing
- Responsiville.Slideshow#event:slideShown
Returns:
Type Description void -
start(){void}
-
Starts the slideshow.
Fires:
Returns:
Type Description void
Events
-
containerAdjusted
-
Called before the slide begins to show.
-
containerAdjusted
-
Called after the slideshow container has been adjusted.
-
containerAdjusted
-
Called after the slideshow container has been adjusted.
-
disabled
-
Called after the slideshow has been disabled.
-
enabled
-
Called after the slideshow has been enabled.
-
Called after the module has been initialised.
-
paused
-
Called after the slideshow has paused.
-
slideHidden
-
Called after the slide has been hidden.
-
slideHidden
-
Called after the slide has been hidden.
-
slideHidden
-
Called after the slide has been hidden.
-
slideHidden
-
Called after the slide has been hidden.
-
slideHiding
-
Called before the slide starts hiding.
-
slideShown
-
Called after the slide has been shown.
-
slideShown
-
Called after the slide has been shown.
-
slideShown
-
Called after the slide has been shown.
-
started
-
Called after the slideshow has started.
-
starting
-
Called when the slideshow is starting.