General purpose configuration options
mode Type of transition between slides. Only used when customAnimation: false
default: 'horizontal'
options: 'horizontal', 'vertical', 'fade'
speed Slide transition duration (in ms). Only used when customAnimation: false
default: 500
options: integer
slideMargin Margin between each slide
default: 0
options: integer
startSlide Starting slide index (zero-based)
default: 0
options: integer
randomStart Start slider on a random slide
default: false
options: boolean (true / false)
slideSelector Element to use as slides (ex. 'div.slide'
).
Note: by default, mbSlider will use all immediate children of the slider element
default: ''
options: jQuery selector
infiniteLoop If true
, clicking "Next" while on the last slide will transition to the first slide and vice-versa
default: true
options: boolean (true / false)
hideControlOnEnd If true
, "Prev" and "Next" controls will receive a class disabled
when slide is the first or the last
Note: Only used when infiniteLoop: false
default: false
options: boolean (true / false)
easing The type of "easing" to use during transitions. If using CSS transitions, include a value for the transition-timing-function
property. If not using CSS transitions, you may include plugins/jquery.easing.1.3.js
for many options.
See http://gsgd.co.uk/sandbox/jquery/easing/ for more info.
default: null
options: if using CSS: 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'cubic-bezier(n,n,n,n)'. If not using CSS: 'swing', 'linear' (see the above file for more options)
captions Include image captions. Captions are derived from the image's title
attribute
default: false
options: boolean (true / false)
captionsCustomClass Add custom class to captions.
default: ""
options: string
ticker Use slider in ticker mode (similar to a news ticker)
default: false
options: boolean (true / false)
tickerHover Ticker will pause when mouse hovers over slider. Note: this functionality does NOT work if using CSS transitions!
default: false
options: boolean (true / false)
adaptiveHeight Dynamically adjust slider height based on each slide's height
default: false
options: boolean (true / false)
adaptiveHeightSpeed Slide height transition duration (in ms). Note: only used if adaptiveHeight: true
default: 500
options: integer
video If any slides contain video, set this to true
. Also, include plugins/jquery.fitvids.js
See http://fitvidsjs.com/ for more info
default: false
options: boolean (true / false)
responsive Enable or disable auto resize of the slider. Useful if you need to use fixed width sliders.
default: true
options: boolean (true /false)
useCSS If true, CSS transitions will be used for horizontal and vertical slide animations (this uses native hardware acceleration). If false, jQuery animate() will be used.
default: true
options: boolean (true / false)
preloadImages If 'all', preloads all images before starting the slider. If 'visible', preloads only images in the initially visible slides before starting the slider (tip: use 'visible' if all slides are identical dimensions)
default: 'visible'
options: 'all', 'visible'
touchEnabled If true
, slider will allow touch swipe transitions
default: true
options: boolean (true / false)
swipeThreshold Amount of pixels a touch swipe needs to exceed in order to execute a slide transition. Note: only used if touchEnabled: true
default: 50
options: integer
oneToOneTouch If true
, non-fade slides follow the finger as it swipes
default: true
options: boolean (true / false)
preventDefaultSwipeX If true
, touch screen will not move along the x-axis as the finger swipes
default: true
options: boolean (true / false)
preventDefaultSwipeY If true
, touch screen will not move along the y-axis as the finger swipes
default: false
options: boolean (true / false)
wrapperClass Class to wrap the slider in. Change to prevent from using default mbSlider styles.
default: 'mb-wrapper'
options: string