You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following are options used to define which background image and transitions are used.
94
+
95
+
> **current ** or **data-current** (default: 0) [Number]
83
96
>> Given the list of images, current defines which image to use first. If `randomize` is set to `true`, then current is not used.
84
-
>> <divdata-current=0>content</div>
85
97
86
-
> **images** or **data-images** (default: [])
87
-
>> List of images to use to create the background slideshow.
98
+
> **images** or **data-images** (default: []) [Array of Strings]
99
+
>> List of images to use to create the background slideshow.
100
+
101
+
> **transitionDelay** or **data-transitionDelay** (default: 5000 or 5 seconds) [Number]
102
+
>> Amount of milliseconds to wait before starting the next transition to the next image.
103
+
104
+
> **transitionSpeed** or **data-transitionSpeed** (default: 3000 or 3 seconds) [Number]
105
+
>> Amount of milliseconds for the transition effect to take
106
+
107
+
> **transitionEffect** or **data-transitionEffect** (default: fade-in) [String]
108
+
>> The type of animation for the transition effect. Currently only 'fade-in' is implemented.
109
+
110
+
> **randomize** or **data-randomize** (default: false) [Boolean]
111
+
>> true - The images selected for the transition are picked randomly and not sequentially.
112
+
>> false - The images selected for the transition are picked sequentially starting from `current`.
113
+
114
+
> **initialBackground** or **data-initialBackground** (default: null) [Number, 'random', url]
115
+
>> If set to anything other than null, then pick a background image from the list of images for the given element.
116
+
>> Number - A number between 0 and the length of the `images` array. [0, images.length). The background of the element is set to this image in the `images` array.
117
+
>> 'random' - The word 'random' indicate to pick a random image from the list of images in the `images` array to use as the initial background.
118
+
>> image url - The url to an image will be used as the background image for this element.
119
+
120
+
> **debug** or **data-debug** (default: false) [Boolean]
121
+
>> true - Print debug messages to the log.console for debugging purposes.
122
+
>> false - No debug messages
123
+
124
+
### Event Handlers
125
+
126
+
Events handlers will be invoked for different events. All event handlers are defaulted to null.
127
+
128
+
> **beforeInit** - arguments (element, settings)
129
+
>> Event triggered before any of the processing is started.
130
+
131
+
> **afterInit** arguments (element, settings)
132
+
>> Event triggered after the processing is completed and the timer is set
>> Event triggered before the transition from the existing image to the next image. The current image can be accessed using $(element).css("background-image")
0 commit comments