` for each slide. Slides can contain images, video, or any other HTML content!
+
+```html
+
+
+
+
+
+
+```
+
+### Step 3: Call the bxSlider
+
+Call .bxSlider() on `
`. Note that the call must be made inside of a $(document).ready() call, or the plugin will not work!
+
+```javascript
+$(document).ready(function(){
+ $('.bxslider').bxSlider();
+});
+```
+
+## Configuration options
+
+### General
+
+**mode**
+
+Type of transition between slides
+```
+default: 'horizontal'
+options: 'horizontal', 'vertical', 'fade'
+```
+
+**speed**
+
+Slide transition duration (in ms)
+```
+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, bxSlider 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)
+```
+
+**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', 'none'
+```
+
+**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 bxSlider styles.
+```
+default: 'bx-wrapper'
+options: string
+```
+
+### Pager
+
+**pager**
+
+If true, a pager will be added
+```
+default: true
+options: boolean (true / false)
+```
+
+**pagerType**
+
+If 'full', a pager link will be generated for each slide. If 'short', a x / y pager will be used (ex. 1 / 5)
+```
+default: 'full'
+options: 'full', 'short'
+```
+
+**pagerShortSeparator**
+
+If pagerType: 'short', pager will use this value as the separating character
+```
+default: ' / '
+options: string
+```
+
+**pagerSelector**
+
+Element used to populate the populate the pager. By default, the pager is appended to the bx-viewport
+```
+default: ''
+options: jQuery selector
+```
+
+**pagerCustom**
+
+Parent element to be used as the pager. Parent element must contain a <a data-slide-index="x"> element for each slide. See example here. Not for use with dynamic carousels.
+```
+default: null
+options: jQuery selector
+```
+
+**buildPager**
+
+If supplied, function is called on every slide element, and the returned value is used as the pager item markup. See examples for detailed implementation
+```
+default: null
+options: function(slideIndex)
+```
+
+### Controls
+
+**controls**
+
+If true, "Next" / "Prev" controls will be added
+```
+default: true
+options: boolean (true / false)
+```
+
+**nextText**
+
+Text to be used for the "Next" control
+```
+default: 'Next'
+options: string
+```
+
+**prevText**
+
+Text to be used for the "Prev" control
+```
+default: 'Prev'
+options: string
+```
+
+**nextSelector**
+
+Element used to populate the "Next" control
+```
+default: null
+options: jQuery selector
+```
+
+**prevSelector**
+
+Element used to populate the "Prev" control
+```
+default: null
+options: jQuery selector
+```
+
+**autoControls**
+
+If true, "Start" / "Stop" controls will be added
+```
+default: false
+options: boolean (true / false)
+```
+
+**startText**
+
+Text to be used for the "Start" control
+```
+default: 'Start'
+options: string
+```
+
+**stopText**
+
+Text to be used for the "Stop" control
+```
+default: 'Stop'
+options: string
+```
+
+**autoControlsCombine**
+
+When slideshow is playing only "Stop" control is displayed and vice-versa
+```
+default: false
+options: boolean (true / false)
+```
+
+**autoControlsSelector**
+
+Element used to populate the auto controls
+```
+default: null
+options: jQuery selector
+```
+
+**keyboardEnabled**
+
+Enable keyboard navigation for visible sliders
+```
+default: false
+options: boolean (true / false)
+```
+
+### Auto
+
+**auto**
+
+Slides will automatically transition
+```
+default: false
+options: boolean (true / false)
+```
+**stopAutoOnClick**
+
+Auto will stop on interaction with controls
+```
+default: false
+options: boolean (true / false)
+```
+
+**pause**
+
+The amount of time (in ms) between each auto transition
+```
+default: 4000
+options: integer
+```
+
+**autoStart**
+
+Auto show starts playing on load. If false, slideshow will start when the "Start" control is clicked
+```
+default: true
+options: boolean (true / false)
+```
+
+**autoDirection**
+
+The direction of auto show slide transitions
+```
+default: 'next'
+options: 'next', 'prev'
+```
+
+**autoHover**
+
+Auto show will pause when mouse hovers over slider
+```
+default: false
+options: boolean (true / false)
+```
+
+**autoDelay**
+
+Time (in ms) auto show should wait before starting
+```
+default: 0
+options: integer
+```
+
+### Carousel
+
+**minSlides**
+
+The minimum number of slides to be shown. Slides will be sized down if carousel becomes smaller than the original size.
+```
+default: 1
+options: integer
+```
+
+**maxSlides**
+
+The maximum number of slides to be shown. Slides will be sized up if carousel becomes larger than the original size.
+```
+default: 1
+options: integer
+```
+
+**moveSlides**
+
+The number of slides to move on transition. This value must be `>= minSlides`, and `<= maxSlides`. If zero (default), the number of fully-visible slides will be used.
+```
+default: 0
+options: integer
+```
+
+**slideWidth**
+
+The width of each slide. This setting is required for all horizontal carousels!
+```
+default: 0
+options: integer
+```
+
+**shrinkItems**
+
+The Carousel will only show whole items and shrink the images to fit the viewport based on maxSlides/MinSlides.
+```
+default: false
+options: boolean (true / false)
+```
+
+### Keyboard
+
+**keyboardEnabled**
+
+Allows for keyboard control of visible slider. Keypress ignored if slider not visible.
+```
+default: false
+options: boolean (true / false)
+```
+
+### Accessibility
+
+**ariaLive**
+
+Adds Aria Live attribute to slider.
+```
+default: true
+options: boolean (true / false)
+```
+
+**ariaHidden**
+
+Adds Aria Hidden attribute to any nonvisible slides.
+```
+default: true
+options: boolean (true / false)
+```
+
+### Callbacks
+
+**onSliderLoad**
+
+Executes immediately after the slider is fully loaded
+```
+default: function(){}
+options: function(currentIndex){ // your code here }
+arguments:
+ currentIndex: element index of the current slide
+```
+
+**onSliderResize**
+
+Executes immediately after the slider is resized
+```
+default: function(){}
+options: function(currentIndex){ // your code here }
+arguments:
+ currentIndex: element index of the current slide
+```
+
+**onSlideBefore**
+
+Executes immediately before each slide transition.
+```
+default: function(){}
+options: function($slideElement, oldIndex, newIndex){ // your code here }
+arguments:
+ $slideElement: jQuery element of the destination element
+ oldIndex: element index of the previous slide (before the transition)
+ newIndex: element index of the destination slide (after the transition)
+```
+
+**onSlideAfter**
+
+Executes immediately after each slide transition. Function argument is the current slide element (when transition completes).
+```
+default: function(){}
+options: function($slideElement, oldIndex, newIndex){ // your code here }
+arguments:
+ $slideElement: jQuery element of the destination element
+ oldIndex: element index of the previous slide (before the transition)
+ newIndex: element index of the destination slide (after the transition)
+```
+
+**onSlideNext**
+
+Executes immediately before each "Next" slide transition. Function argument is the target (next) slide element.
+```
+default: function(){}
+options: function($slideElement, oldIndex, newIndex){ // your code here }
+arguments:
+ $slideElement: jQuery element of the destination element
+ oldIndex: element index of the previous slide (before the transition)
+ newIndex: element index of the destination slide (after the transition)
+```
+
+**onSlidePrev**
+
+Executes immediately before each "Prev" slide transition. Function argument is the target (prev) slide element.
+```
+default: function(){}
+options: function($slideElement, oldIndex, newIndex){ // your code here }
+arguments:
+ $slideElement: jQuery element of the destination element
+ oldIndex: element index of the previous slide (before the transition)
+ newIndex: element index of the destination slide (after the transition)
+```
+
+**onAutoChange**
+
+Executes immediately after auto transtion starts or stops.
+```
+default: function(){}
+options: function(state){ // your code here }
+arguments:
+ state: the new state of "auto": boolean (true / false)
+```
+
+### Public methods
+
+**goToSlide**
+
+Performs a slide transition to the supplied slide index (zero-based)
+```
+example:
+slider = $('.bxslider').bxSlider();
+slider.goToSlide(3);
+```
+
+**goToNextSlide**
+
+Performs a "Next" slide transition
+```
+example:
+slider = $('.bxslider').bxSlider();
+slider.goToNextSlide();
+```
+
+**goToPrevSlide**
+
+Performs a "Prev" slide transition
+```
+example:
+slider = $('.bxslider').bxSlider();
+slider.goToPrevSlide();
+```
+
+**startAuto**
+Starts the auto show. Provide an argument `false` to prevent the auto controls from being updated.
+```
+example:
+slider = $('.bxslider').bxSlider();
+slider.startAuto();
+```
+
+**stopAuto**
+
+Stops the auto show. Provide an argument `false` to prevent the auto controls from being updated.
+```
+example:
+slider = $('.bxslider').bxSlider();
+slider.stopAuto();
+```
+
+**getCurrentSlide**
+
+Returns the current active slide
+```
+example:
+slider = $('.bxslider').bxSlider();
+var current = slider.getCurrentSlide();
+```
+
+**getSlideCount**
+
+Returns the total number of slides in the slider
+```
+example:
+slider = $('.bxslider').bxSlider();
+var slideQty = slider.getSlideCount();
+```
+
+**redrawSlider**
+
+Redraw the slider. Useful when needing to redraw a hidden slider after it is unhidden.
+```
+example:
+slider = $('.bxslider').bxSlider();
+slider.redrawSlider();
+```
+
+**reloadSlider**
+
+Reload the slider. Useful when adding slides on the fly. Accepts an optional settings object.
+```
+example:
+slider = $('.bxslider').bxSlider();
+slider.reloadSlider();
+```
+
+**destroySlider**
+
+Destroy the slider. This reverts all slider elements back to their original state (before calling the slider).
+```
+example:
+slider = $('.bxslider').bxSlider();
+slider.destroySlider();
+```
+
+### Local Development with Gulp
+
+**Unfamiliar with npm? Don't have node installed?** [Download and install node.js](http://nodejs.org/download/) before proceeding.
+
+From the command line:
+
+1. Install the CLI: `npm install --global gulp-cli`
+2. Run `npm install` to install local development tools
+3. Run `gulp` which will build the project
+
+## Contributing
+
+Everyone is welcome to help [contribute](CONTRIBUTING.md) and improve this project. There are several ways you can contribute:
+
+* Reporting issues (please read [issue guidelines](https://github.com/necolas/issue-guidelines))
+* Suggesting new features
+* Writing or refactoring code
+* Fixing [issues](https://github.com/roots/roots/issues)
+
+## Changelog
+
+### Version 4.2.14
+* Fixing flickering (on -webkit) when used background-image to instead of
+* FIX calling API method stopAuto()
+* InvalidPointerId on Android 6
+* Use jQuery.fn.on instead of jQuery.fn.bind #1126
+* InvalidPointerId on Android 6
+
+### Version 4.2.13
+* Fix error pagerqty
+* Fix the problem #48 in the version 4.2.5 when using YUI Compressor
+* Fix division by 0
+* Ensure that slider.working is set to false at the end of goToSlide(), regardless of what happened with position.
+* Add Callback for when Auto changes...
+* Fix for Firefox59 and PointerEvent standard compatibility
+* Fix for middle mouse click
+* Fix typo
+* Format the license in package.json to match the SPDX standard
+* Code formatting
+
+### Version 4.2.12
+* Fixes auto control theme
+
+### Version 4.2.11
+* Removes auto-centering for sliders with no pager or controls
+
+### Version 4.2.10
+* Bumps npm and bower versions
+
+### Version 4.2.9
+* Removes node engine version requirement
+
+### Version 4.2.8
+* Removes auto-centering from the theme file (`jquery.bxslider.css`)
+
+### Version 4.2.7
+* Allows new version to be published to NPM
+
+### Version 4.2.6
+* Fix: jQuery 3 support
+* Adds Gulp and removes Grunt (for easier local development)
+
+### Version 4.2.5
+* Fix: Vertical carousel minSlides not working #840
+* Fix: slider breaks with css animations if settings.speed set to 0 #838
+* Fix: Slider runs into undefined state when reloadSlider is called before initialization was finished #833
+
+### Version 4.2.4
+
+NOTICE: We have switched to a Grunt based build process in order to leverage [Assemble](http://assemble.io) for local documentation building. Please review the above notes about Grunt for the commands available.
+
+* Fix: Fixed transition from first to last slide during infinite loop #778
+* Fix: Reload on multiple sliders doesn't work? #755
+* Fix: bxSlider with text only #746
+* Fix: bower missing main and ignore entries #738
+* Fix: Tickermode transitionend event bubbling #737
+* Fix: Initializing before destroyed breaks slider #748
+* Enhancement: Added shrinkItems carousel setting #772
+* Enhancement: Maintain auto display of slides after a manual selection #594
+* Enhancement: Slider getter through jquery object #739
+* Enhancement: Add aria attributes #751
+* Enhancement: Slider element in every callback and a new method getSliderElement (#780)
+* Enhancement: Local Documentiation and examples. I have added buildable documentation to the repo. This will expand over time and allow for community corrections as needed. Please see above Grunt notes on how to build.
+
+
+### Version 4.2.3
+* Minor bug fix
+
+### Version 4.2.2
+* Fix: Remove unused plugin variable (#733)
+* Fix: `updateAfterSlideTransition` not being called (#704)
+* Fix: Slider stops auto advancing (#702)
+* Fix: Refresh page, slider show the last item at the first in mode: 'horizontal' (#694)
+* Fix: horizintal ticker stutters on loop (#669)
+* Fix: Wrong bx-wrapper bottom margin with controls=true and pager=false (#647)
+* Fix: add css tickerHover. (#629)
+* Fix: Slider refusing to scale down, only up (#611)
+* Fix: bxSlider freezes on touch devices (#540)
+* Fix: Multiple fixes and improvements for Windows Mobile Devices (#596)
+* Fix: Accessing bxslider's slider object inside its “onSliderLoad” callback returns undefined (#475)
+* Fix: infiniteLoop glitch when scrolling from first to last slide (#429)
+* Enhancement: Cancel transitions on callbacks by returning false. (#411)
+* Enhancement: Added Keyboard arrow left and right support (#239)
+
+### Version 4.2.1
+* Fix: Merge Conflict in dist
+* Fix: modified bower.json
+
+### Version 4.2.0
+* Fix: Reverse #714, fixes #722.
+* Fix: Repo Tag #729
+* Fix: #720 pagerCustom issues
+
+4.2.0 Introduces a streamlined build process using [gulp](www.gulpjs.com). Along with this new build process the projects folder structure has been changed. You will find a `dist` folder with all assets ready to use, including both minified and unminified versions of the javascript. These assets should be ready to go. In `src` you will find the uncompiled assets, including a new less version of the css for bxslider. This is an important step for bxslider. It will help speed development up and keep work clean. It also paves the way for a big revamp we have planned in the future.
+
+**Unfamiliar with npm? Don't have node installed?** [Download and install node.js](http://nodejs.org/download/) before proceeding.
+
+From the command line:
+
+1. Install [gulp](http://gulpjs.com) globally with `npm install -g gulp`
+2. Navigate to the project directory, then run `npm install`
+
+You now have all the necessary dependencies to run the build process.
+
+### Available gulp commands
+
+* `gulp` — Compile and optimize all files to `dist`
+* `gulp styles` — Compile css assets only to `dist`
+* `gulp scripts` — Compile js assets only to `dist`
+* `gulp images` - Run lossless compression on all the images and copy to `dist`
+* `gulp jshint` — Checks JS and JSON code for errors based on our .jshintrc settings
+
+
+### Version 4.1.3
+* Fix: responsive issue for horizontal mode for issue #611, #714
+* Fix: extra space on the left when using fade mode. #715
+* Fix: wrongly removing custom pager in destroySlider #610
+* Fix: bug with reloading slider with custom pager #545
+* Fix: Issue with infinite scroll sometimes returning to 0 #481
+* Fix: When "infiniteLoop" is used, true is not passed to a clone method. #346
+* Fix: "pagerCustom" won't work when using reloadSlider #171
+* Fix: Remove vendor prefix for translateZ(0) #565
+* Fix: give styles on focus for accessibility #228
+* Fix: Minified Version out of sync.
+* Fix: Remove -5px left #517
+* Enhancement: Invert order call of appendControls() and appendPager() #226
+* Enhancement: Various Indentation and typos in docs fixed. #551, #578
+* Enhancement: Update jsDelivr with update.json for autoupdate of CDN
+* Enhancement: Tag Repo so it can be included in CDNJS
+* Created development branch to work from. Eventually will restructure entire repo to follow best practice setup.
+
+
+### Version 4.1.2
+* Added `bower.json` configuration file. Manage bxSlider as a dependency using [bower](http://bower.io/).
+
+### Version 4.1.1
+* Removed imagesLoaded library and added iframe preloading support
+* Added responsive option - setting to false will prevent $(window).resize binding
+
+### Version 4.1
+* Carousel mode (minSlides / maxSlides) was re-written to be more intuitive.
+* SlideWidth now acts as it should (slides respect the width value).
+* SlideWidth now properly parsed: accepts string ("600px") or integer (600).
+* Slider now only needs to load visible slides (by default) in order to initialize which results in much faster loading. A "preloadImages" setting allows for configuration.
+
+
+Long live Zep.
diff --git a/images/bx_loader.gif b/dist/images/bx_loader.gif
similarity index 100%
rename from images/bx_loader.gif
rename to dist/images/bx_loader.gif
diff --git a/images/controls.png b/dist/images/controls.png
similarity index 100%
rename from images/controls.png
rename to dist/images/controls.png
diff --git a/dist/index.html b/dist/index.html
new file mode 100644
index 00000000..cd6e1d39
--- /dev/null
+++ b/dist/index.html
@@ -0,0 +1,29 @@
+
+
+
+
"],_default:[0,"",""]};la.optgroup=la.option,la.tbody=la.tfoot=la.colgroup=la.caption=la.thead,la.th=la.td;function ma(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function na(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=ma(l.appendChild(f),"script"),j&&na(g),c){k=0;while(f=g[k++])ka.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var qa=d.documentElement,ra=/^key/,sa=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ta=/^([^.]*)(?:\.(.+)|)/;function ua(){return!0}function va(){return!1}function wa(){try{return d.activeElement}catch(a){}}function xa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)xa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=va;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(qa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,za=/
+
```
-###Step 2: Create HTML markup
+Or, if you prefer, you can get the bxSlider's resources from the **CDN**:
+
+```html
+
+
+```
+
+### Step 2: Create HTML markup
Create a `
` element, with a `
` for each slide. Slides can contain images, video, or any other HTML content!
@@ -46,9 +54,9 @@ Create a `
` element, with a `
` for each slide. Slides c
```
-###Step 3: Call the bxSlider
+### Step 3: Call the bxSlider
-Call .bxslider() on `
`. Note that the call must be made inside of a $(document).ready() call, or the plugin will not work!
+Call .bxSlider() on `
`. Note that the call must be made inside of a $(document).ready() call, or the plugin will not work!
```javascript
$(document).ready(function(){
@@ -56,481 +64,804 @@ $(document).ready(function(){
});
```
-##Configuration options
+## Configuration options
+
+### General
-###General
+**mode**
-**mode**
Type of transition between slides
```
-default: 'horizontal'
+default: 'horizontal'
options: 'horizontal', 'vertical', 'fade'
```
-**speed**
+**speed**
+
Slide transition duration (in ms)
```
-default: 500
+default: 500
options: integer
```
-**slideMargin**
+**slideMargin**
+
Margin between each slide
```
-default: 0
+default: 0
options: integer
```
-**startSlide**
+**startSlide**
+
Starting slide index (zero-based)
```
-default: 0
+default: 0
options: integer
```
-**randomStart**
+**randomStart**
+
Start slider on a random slide
```
-default: false
+default: false
options: boolean (true / false)
```
-**slideSelector**
+**slideSelector**
+
Element to use as slides (ex. 'div.slide'). Note: by default, bxSlider will use all immediate children of the slider element
```
-default: ''
+default: ''
options: jQuery selector
```
-**infiniteLoop**
+**infiniteLoop**
+
If true, clicking "Next" while on the last slide will transition to the first slide and vice-versa
```
-default: true
+default: true
options: boolean (true / false)
```
-**hideControlOnEnd**
-If true, "Next" control will be hidden on last slide and vice-versa Note: Only used when infiniteLoop: 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
+default: false
options: boolean (true / false)
```
-**easing**
+**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
+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**
+**captions**
+
Include image captions. Captions are derived from the image's title attribute
```
-default: false
+default: false
options: boolean (true / false)
```
-**ticker**
+**ticker**
+
Use slider in ticker mode (similar to a news ticker)
```
-default: false
+default: false
options: boolean (true / false)
```
-**tickerHover**
+**tickerHover**
+
Ticker will pause when mouse hovers over slider. Note: this functionality does NOT work if using CSS transitions!
```
-default: false
+default: false
options: boolean (true / false)
```
-**adaptiveHeight**
+**adaptiveHeight**
+
Dynamically adjust slider height based on each slide's height
```
-default: false
+default: false
options: boolean (true / false)
```
-**adaptiveHeightSpeed**
+**adaptiveHeightSpeed**
+
Slide height transition duration (in ms). Note: only used if adaptiveHeight: true
```
-default: 500
+default: 500
options: integer
```
-**video**
+**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
+default: false
options: boolean (true / false)
```
-**useCSS**
+**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
+default: true
options: boolean (true / false)
```
-**preloadImages**
+**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: all
-options: 'all', 'visible'
+default: 'visible'
+options: 'all', 'visible', 'none'
```
-**touchEnabled**
+**touchEnabled**
+
If true, slider will allow touch swipe transitions
```
-default: true
+default: true
options: boolean (true / false)
```
-**swipeThreshold**
+**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
+default: 50
options: integer
```
-**oneToOneTouch**
+**oneToOneTouch**
+
If true, non-fade slides follow the finger as it swipes
```
-default: true
+default: true
options: boolean (true / false)
```
-**preventDefaultSwipeX**
+**preventDefaultSwipeX**
+
If true, touch screen will not move along the x-axis as the finger swipes
```
-default: true
+default: true
options: boolean (true / false)
```
-**preventDefaultSwipeY**
+**preventDefaultSwipeY**
+
If true, touch screen will not move along the y-axis as the finger swipes
```
-default: false
+default: false
options: boolean (true / false)
```
-###Pager
+**wrapperClass**
+
+Class to wrap the slider in. Change to prevent from using default bxSlider styles.
+```
+default: 'bx-wrapper'
+options: string
+```
+
+### Pager
+
+**pager**
-**pager**
If true, a pager will be added
```
-default: true
+default: true
options: boolean (true / false)
```
-**pagerType**
+**pagerType**
+
If 'full', a pager link will be generated for each slide. If 'short', a x / y pager will be used (ex. 1 / 5)
```
-default: 'full'
+default: 'full'
options: 'full', 'short'
```
-**pagerShortSeparator**
+**pagerShortSeparator**
+
If pagerType: 'short', pager will use this value as the separating character
```
-default: ' / '
+default: ' / '
options: string
```
-**pagerSelector**
+**pagerSelector**
+
Element used to populate the populate the pager. By default, the pager is appended to the bx-viewport
```
-default: ''
+default: ''
options: jQuery selector
```
-**pagerCustom**
+**pagerCustom**
+
Parent element to be used as the pager. Parent element must contain a <a data-slide-index="x"> element for each slide. See example here. Not for use with dynamic carousels.
```
-default: null
+default: null
options: jQuery selector
```
-**buildPager**
+**buildPager**
+
If supplied, function is called on every slide element, and the returned value is used as the pager item markup. See examples for detailed implementation
```
-default: null
+default: null
options: function(slideIndex)
```
-###Controls
+### Controls
+
+**controls**
-**controls**
If true, "Next" / "Prev" controls will be added
```
-default: true
+default: true
options: boolean (true / false)
```
-**nextText**
+**nextText**
+
Text to be used for the "Next" control
```
-default: 'Next'
+default: 'Next'
options: string
```
-**prevText**
+**prevText**
+
Text to be used for the "Prev" control
```
-default: 'Prev'
+default: 'Prev'
options: string
```
-**nextSelector**
+**nextSelector**
+
Element used to populate the "Next" control
```
-default: null
+default: null
options: jQuery selector
```
-**prevSelector**
+**prevSelector**
+
Element used to populate the "Prev" control
```
-default: null
+default: null
options: jQuery selector
```
-**autoControls**
+**autoControls**
+
If true, "Start" / "Stop" controls will be added
```
-default: false
+default: false
options: boolean (true / false)
```
-**startText**
+**startText**
+
Text to be used for the "Start" control
```
-default: 'Start'
+default: 'Start'
options: string
```
-**stopText**
+**stopText**
+
Text to be used for the "Stop" control
```
-default: 'Stop'
+default: 'Stop'
options: string
```
-**autoControlsCombine**
+**autoControlsCombine**
+
When slideshow is playing only "Stop" control is displayed and vice-versa
```
-default: false
+default: false
options: boolean (true / false)
```
-**autoControlsSelector**
+**autoControlsSelector**
+
Element used to populate the auto controls
```
-default: null
+default: null
options: jQuery selector
```
-###Auto
+**keyboardEnabled**
+
+Enable keyboard navigation for visible sliders
+```
+default: false
+options: boolean (true / false)
+```
+
+### Auto
+
+**auto**
-**auto**
Slides will automatically transition
```
-default: false
+default: false
options: boolean (true / false)
```
+**stopAutoOnClick**
+
+Auto will stop on interaction with controls
+```
+default: false
+options: boolean (true / false)
+```
+
+**pause**
-**pause**
The amount of time (in ms) between each auto transition
```
-default: 4000
+default: 4000
options: integer
```
-**autoStart**
+**autoStart**
+
Auto show starts playing on load. If false, slideshow will start when the "Start" control is clicked
```
-default: true
+default: true
options: boolean (true / false)
```
-**autoDirection**
+**autoDirection**
+
The direction of auto show slide transitions
```
-default: 'next'
+default: 'next'
options: 'next', 'prev'
```
-**autoHover**
+**autoHover**
+
Auto show will pause when mouse hovers over slider
```
-default: false
+default: false
options: boolean (true / false)
```
-**autoDelay**
+**autoDelay**
+
Time (in ms) auto show should wait before starting
```
-default: 0
+default: 0
options: integer
```
-###Carousel
+### Carousel
+
+**minSlides**
-**minSlides**
The minimum number of slides to be shown. Slides will be sized down if carousel becomes smaller than the original size.
```
-default: 1
+default: 1
options: integer
```
-**maxSlides**
+**maxSlides**
+
The maximum number of slides to be shown. Slides will be sized up if carousel becomes larger than the original size.
```
-default: 1
+default: 1
options: integer
```
-**moveSlides**
-The number of slides to move on transition. This value must be >= minSlides, and <= maxSlides. If zero (default), the number of fully-visible slides will be used.
+**moveSlides**
+
+The number of slides to move on transition. This value must be `>= minSlides`, and `<= maxSlides`. If zero (default), the number of fully-visible slides will be used.
```
-default: 0
+default: 0
options: integer
```
-**slideWidth**
+**slideWidth**
+
The width of each slide. This setting is required for all horizontal carousels!
```
-default: 0
+default: 0
options: integer
```
-###Callbacks
+**shrinkItems**
+
+The Carousel will only show whole items and shrink the images to fit the viewport based on maxSlides/MinSlides.
+```
+default: false
+options: boolean (true / false)
+```
+
+### Keyboard
+
+**keyboardEnabled**
+
+Allows for keyboard control of visible slider. Keypress ignored if slider not visible.
+```
+default: false
+options: boolean (true / false)
+```
+
+### Accessibility
+
+**ariaLive**
+
+Adds Aria Live attribute to slider.
+```
+default: true
+options: boolean (true / false)
+```
+
+**ariaHidden**
+
+Adds Aria Hidden attribute to any nonvisible slides.
+```
+default: true
+options: boolean (true / false)
+```
+
+### Callbacks
+
+**onSliderLoad**
-**onSliderLoad**
Executes immediately after the slider is fully loaded
```
-default: function(){}
+default: function(){}
+options: function(currentIndex){ // your code here }
+arguments:
+ currentIndex: element index of the current slide
+```
+
+**onSliderResize**
+
+Executes immediately after the slider is resized
+```
+default: function(){}
options: function(currentIndex){ // your code here }
-arguments:
+arguments:
currentIndex: element index of the current slide
```
-**onSlideBefore**
+**onSlideBefore**
+
Executes immediately before each slide transition.
```
-default: function(){}
+default: function(){}
options: function($slideElement, oldIndex, newIndex){ // your code here }
-arguments:
+arguments:
$slideElement: jQuery element of the destination element
oldIndex: element index of the previous slide (before the transition)
newIndex: element index of the destination slide (after the transition)
```
-**onSlideAfter**
+**onSlideAfter**
+
Executes immediately after each slide transition. Function argument is the current slide element (when transition completes).
```
-default: function(){}
+default: function(){}
options: function($slideElement, oldIndex, newIndex){ // your code here }
-arguments:
+arguments:
$slideElement: jQuery element of the destination element
oldIndex: element index of the previous slide (before the transition)
newIndex: element index of the destination slide (after the transition)
```
-**onSlideNext**
+**onSlideNext**
+
Executes immediately before each "Next" slide transition. Function argument is the target (next) slide element.
```
-default: function(){}
+default: function(){}
options: function($slideElement, oldIndex, newIndex){ // your code here }
-arguments:
+arguments:
$slideElement: jQuery element of the destination element
oldIndex: element index of the previous slide (before the transition)
newIndex: element index of the destination slide (after the transition)
```
-**onSlidePrev**
+**onSlidePrev**
+
Executes immediately before each "Prev" slide transition. Function argument is the target (prev) slide element.
```
-default: function(){}
+default: function(){}
options: function($slideElement, oldIndex, newIndex){ // your code here }
-arguments:
+arguments:
$slideElement: jQuery element of the destination element
oldIndex: element index of the previous slide (before the transition)
newIndex: element index of the destination slide (after the transition)
```
-###Public methods
+**onAutoChange**
+
+Executes immediately after auto transtion starts or stops.
+```
+default: function(){}
+options: function(state){ // your code here }
+arguments:
+ state: the new state of "auto": boolean (true / false)
+```
+
+### Public methods
+
+**goToSlide**
-**goToSlide**
Performs a slide transition to the supplied slide index (zero-based)
```
-example:
+example:
slider = $('.bxslider').bxSlider();
-slider.goToSlide(3);
+slider.goToSlide(3);
```
-**goToNextSlide**
+**goToNextSlide**
+
Performs a "Next" slide transition
```
-example:
+example:
slider = $('.bxslider').bxSlider();
-slider.goToNextSlide();
+slider.goToNextSlide();
```
-**goToPrevSlide**
+**goToPrevSlide**
+
Performs a "Prev" slide transition
```
-example:
+example:
slider = $('.bxslider').bxSlider();
-slider.goToPrevSlide();
+slider.goToPrevSlide();
```
-**startAuto**
-Starts the auto show. Provide an argument false to prevent the auto controls from being updated.
+**startAuto**
+Starts the auto show. Provide an argument `false` to prevent the auto controls from being updated.
```
-example:
+example:
slider = $('.bxslider').bxSlider();
-slider.startAuto();
+slider.startAuto();
```
-**stopAuto**
-Stops the auto show. Provide an argument false to prevent the auto controls from being updated.
+**stopAuto**
+
+Stops the auto show. Provide an argument `false` to prevent the auto controls from being updated.
```
-example:
+example:
slider = $('.bxslider').bxSlider();
-slider.stopAuto();
+slider.stopAuto();
```
-**getCurrentSlide**
+**getCurrentSlide**
+
Returns the current active slide
```
-example:
+example:
slider = $('.bxslider').bxSlider();
-var current = slider.getCurrentSlide();
+var current = slider.getCurrentSlide();
```
-**getSlideCount**
+**getSlideCount**
+
Returns the total number of slides in the slider
```
-example:
+example:
+slider = $('.bxslider').bxSlider();
+var slideQty = slider.getSlideCount();
+```
+
+**redrawSlider**
+
+Redraw the slider. Useful when needing to redraw a hidden slider after it is unhidden.
+```
+example:
slider = $('.bxslider').bxSlider();
-var slideQty = slider.getSlideCount();
+slider.redrawSlider();
```
-**reloadSlider**
-Reload the slider. Useful when adding slides on the fly. Accepts an optional settings object. See here for an example.
+**reloadSlider**
+
+Reload the slider. Useful when adding slides on the fly. Accepts an optional settings object.
```
-example:
+example:
slider = $('.bxslider').bxSlider();
-slider.reloadSlider();
+slider.reloadSlider();
```
-**destroySlider**
+**destroySlider**
+
Destroy the slider. This reverts all slider elements back to their original state (before calling the slider).
```
-example:
+example:
slider = $('.bxslider').bxSlider();
-slider.destroySlider();
+slider.destroySlider();
```
-Long live Zep.
\ No newline at end of file
+### Local Development with Gulp
+
+**Unfamiliar with npm? Don't have node installed?** [Download and install node.js](http://nodejs.org/download/) before proceeding.
+
+From the command line:
+
+1. Install the CLI: `npm install --global gulp-cli`
+2. Run `npm install` to install local development tools
+3. Run `gulp` which will build the project
+
+## Contributing
+
+Everyone is welcome to help [contribute](CONTRIBUTING.md) and improve this project. There are several ways you can contribute:
+
+* Reporting issues (please read [issue guidelines](https://github.com/necolas/issue-guidelines))
+* Suggesting new features
+* Writing or refactoring code
+* Fixing [issues](https://github.com/roots/roots/issues)
+
+## Changelog
+
+### Version 4.2.14
+* Fixing flickering (on -webkit) when used background-image to instead of
+* FIX calling API method stopAuto()
+* InvalidPointerId on Android 6
+* Use jQuery.fn.on instead of jQuery.fn.bind #1126
+* InvalidPointerId on Android 6
+
+### Version 4.2.13
+* Fix error pagerqty
+* Fix the problem #48 in the version 4.2.5 when using YUI Compressor
+* Fix division by 0
+* Ensure that slider.working is set to false at the end of goToSlide(), regardless of what happened with position.
+* Add Callback for when Auto changes...
+* Fix for Firefox59 and PointerEvent standard compatibility
+* Fix for middle mouse click
+* Fix typo
+* Format the license in package.json to match the SPDX standard
+* Code formatting
+
+### Version 4.2.12
+* Fixes auto control theme
+
+### Version 4.2.11
+* Removes auto-centering for sliders with no pager or controls
+
+### Version 4.2.10
+* Bumps npm and bower versions
+
+### Version 4.2.9
+* Removes node engine version requirement
+
+### Version 4.2.8
+* Removes auto-centering from the theme file (`jquery.bxslider.css`)
+
+### Version 4.2.7
+* Allows new version to be published to NPM
+
+### Version 4.2.6
+* Fix: jQuery 3 support
+* Adds Gulp and removes Grunt (for easier local development)
+
+### Version 4.2.5
+* Fix: Vertical carousel minSlides not working #840
+* Fix: slider breaks with css animations if settings.speed set to 0 #838
+* Fix: Slider runs into undefined state when reloadSlider is called before initialization was finished #833
+
+### Version 4.2.4
+
+NOTICE: We have switched to a Grunt based build process in order to leverage [Assemble](http://assemble.io) for local documentation building. Please review the above notes about Grunt for the commands available.
+
+* Fix: Fixed transition from first to last slide during infinite loop #778
+* Fix: Reload on multiple sliders doesn't work? #755
+* Fix: bxSlider with text only #746
+* Fix: bower missing main and ignore entries #738
+* Fix: Tickermode transitionend event bubbling #737
+* Fix: Initializing before destroyed breaks slider #748
+* Enhancement: Added shrinkItems carousel setting #772
+* Enhancement: Maintain auto display of slides after a manual selection #594
+* Enhancement: Slider getter through jquery object #739
+* Enhancement: Add aria attributes #751
+* Enhancement: Slider element in every callback and a new method getSliderElement (#780)
+* Enhancement: Local Documentiation and examples. I have added buildable documentation to the repo. This will expand over time and allow for community corrections as needed. Please see above Grunt notes on how to build.
+
+
+### Version 4.2.3
+* Minor bug fix
+
+### Version 4.2.2
+* Fix: Remove unused plugin variable (#733)
+* Fix: `updateAfterSlideTransition` not being called (#704)
+* Fix: Slider stops auto advancing (#702)
+* Fix: Refresh page, slider show the last item at the first in mode: 'horizontal' (#694)
+* Fix: horizintal ticker stutters on loop (#669)
+* Fix: Wrong bx-wrapper bottom margin with controls=true and pager=false (#647)
+* Fix: add css tickerHover. (#629)
+* Fix: Slider refusing to scale down, only up (#611)
+* Fix: bxSlider freezes on touch devices (#540)
+* Fix: Multiple fixes and improvements for Windows Mobile Devices (#596)
+* Fix: Accessing bxslider's slider object inside its “onSliderLoad” callback returns undefined (#475)
+* Fix: infiniteLoop glitch when scrolling from first to last slide (#429)
+* Enhancement: Cancel transitions on callbacks by returning false. (#411)
+* Enhancement: Added Keyboard arrow left and right support (#239)
+
+### Version 4.2.1
+* Fix: Merge Conflict in dist
+* Fix: modified bower.json
+
+### Version 4.2.0
+* Fix: Reverse #714, fixes #722.
+* Fix: Repo Tag #729
+* Fix: #720 pagerCustom issues
+
+4.2.0 Introduces a streamlined build process using [gulp](www.gulpjs.com). Along with this new build process the projects folder structure has been changed. You will find a `dist` folder with all assets ready to use, including both minified and unminified versions of the javascript. These assets should be ready to go. In `src` you will find the uncompiled assets, including a new less version of the css for bxslider. This is an important step for bxslider. It will help speed development up and keep work clean. It also paves the way for a big revamp we have planned in the future.
+
+**Unfamiliar with npm? Don't have node installed?** [Download and install node.js](http://nodejs.org/download/) before proceeding.
+
+From the command line:
+
+1. Install [gulp](http://gulpjs.com) globally with `npm install -g gulp`
+2. Navigate to the project directory, then run `npm install`
+
+You now have all the necessary dependencies to run the build process.
+
+### Available gulp commands
+
+* `gulp` — Compile and optimize all files to `dist`
+* `gulp styles` — Compile css assets only to `dist`
+* `gulp scripts` — Compile js assets only to `dist`
+* `gulp images` - Run lossless compression on all the images and copy to `dist`
+* `gulp jshint` — Checks JS and JSON code for errors based on our .jshintrc settings
+
+
+### Version 4.1.3
+* Fix: responsive issue for horizontal mode for issue #611, #714
+* Fix: extra space on the left when using fade mode. #715
+* Fix: wrongly removing custom pager in destroySlider #610
+* Fix: bug with reloading slider with custom pager #545
+* Fix: Issue with infinite scroll sometimes returning to 0 #481
+* Fix: When "infiniteLoop" is used, true is not passed to a clone method. #346
+* Fix: "pagerCustom" won't work when using reloadSlider #171
+* Fix: Remove vendor prefix for translateZ(0) #565
+* Fix: give styles on focus for accessibility #228
+* Fix: Minified Version out of sync.
+* Fix: Remove -5px left #517
+* Enhancement: Invert order call of appendControls() and appendPager() #226
+* Enhancement: Various Indentation and typos in docs fixed. #551, #578
+* Enhancement: Update jsDelivr with update.json for autoupdate of CDN
+* Enhancement: Tag Repo so it can be included in CDNJS
+* Created development branch to work from. Eventually will restructure entire repo to follow best practice setup.
+
+
+### Version 4.1.2
+* Added `bower.json` configuration file. Manage bxSlider as a dependency using [bower](http://bower.io/).
+
+### Version 4.1.1
+* Removed imagesLoaded library and added iframe preloading support
+* Added responsive option - setting to false will prevent $(window).resize binding
+
+### Version 4.1
+* Carousel mode (minSlides / maxSlides) was re-written to be more intuitive.
+* SlideWidth now acts as it should (slides respect the width value).
+* SlideWidth now properly parsed: accepts string ("600px") or integer (600).
+* Slider now only needs to load visible slides (by default) in order to initialize which results in much faster loading. A "preloadImages" setting allows for configuration.
+
+
+Long live Zep.
diff --git a/src/css/jquery.bxslider.css b/src/css/jquery.bxslider.css
new file mode 100644
index 00000000..71f6f750
--- /dev/null
+++ b/src/css/jquery.bxslider.css
@@ -0,0 +1,179 @@
+/** VARIABLES
+===================================*/
+/** RESET AND LAYOUT
+===================================*/
+.bx-wrapper {
+ position: relative;
+ margin-bottom: 60px;
+ padding: 0;
+ *zoom: 1;
+ -ms-touch-action: pan-y;
+ touch-action: pan-y;
+}
+.bx-wrapper img {
+ max-width: 100%;
+ display: block;
+}
+.bxslider {
+ margin: 0;
+ padding: 0;
+ /*fix flickering when used background-image instead of (on Chrome)*/
+ -webkit-perspective: 1000;
+}
+ul.bxslider {
+ list-style: none;
+}
+.bx-viewport {
+ /* fix other elements on the page moving (in Chrome) */
+ -webkit-transform: translateZ(0);
+}
+/** THEME
+===================================*/
+.bx-wrapper {
+ -moz-box-shadow: 0 0 5px #ccc;
+ -webkit-box-shadow: 0 0 5px #ccc;
+ box-shadow: 0 0 5px #ccc;
+ border: 5px solid #fff;
+ background: #fff;
+}
+.bx-wrapper .bx-pager,
+.bx-wrapper .bx-controls-auto {
+ position: absolute;
+ bottom: -30px;
+ width: 100%;
+}
+/* LOADER */
+.bx-wrapper .bx-loading {
+ min-height: 50px;
+ background: url('images/bx_loader.gif') center center no-repeat #ffffff;
+ height: 100%;
+ width: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 2000;
+}
+/* PAGER */
+.bx-wrapper .bx-pager {
+ text-align: center;
+ font-size: .85em;
+ font-family: Arial;
+ font-weight: bold;
+ color: #666;
+ padding-top: 20px;
+}
+.bx-wrapper .bx-pager.bx-default-pager a {
+ background: #666;
+ text-indent: -9999px;
+ display: block;
+ width: 10px;
+ height: 10px;
+ margin: 0 5px;
+ outline: 0;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+}
+.bx-wrapper .bx-pager.bx-default-pager a:hover,
+.bx-wrapper .bx-pager.bx-default-pager a.active,
+.bx-wrapper .bx-pager.bx-default-pager a:focus {
+ background: #000;
+}
+.bx-wrapper .bx-pager-item,
+.bx-wrapper .bx-controls-auto .bx-controls-auto-item {
+ display: inline-block;
+ vertical-align: bottom;
+ *zoom: 1;
+ *display: inline;
+}
+.bx-wrapper .bx-pager-item {
+ font-size: 0;
+ line-height: 0;
+}
+/* DIRECTION CONTROLS (NEXT / PREV) */
+.bx-wrapper .bx-prev {
+ left: 10px;
+ background: url('images/controls.png') no-repeat 0 -32px;
+}
+.bx-wrapper .bx-prev:hover,
+.bx-wrapper .bx-prev:focus {
+ background-position: 0 0;
+}
+.bx-wrapper .bx-next {
+ right: 10px;
+ background: url('images/controls.png') no-repeat -43px -32px;
+}
+.bx-wrapper .bx-next:hover,
+.bx-wrapper .bx-next:focus {
+ background-position: -43px 0;
+}
+.bx-wrapper .bx-controls-direction a {
+ position: absolute;
+ top: 50%;
+ margin-top: -16px;
+ outline: 0;
+ width: 32px;
+ height: 32px;
+ text-indent: -9999px;
+ z-index: 9999;
+}
+.bx-wrapper .bx-controls-direction a.disabled {
+ display: none;
+}
+/* AUTO CONTROLS (START / STOP) */
+.bx-wrapper .bx-controls-auto {
+ text-align: center;
+}
+.bx-wrapper .bx-controls-auto .bx-start {
+ display: block;
+ text-indent: -9999px;
+ width: 10px;
+ height: 11px;
+ outline: 0;
+ background: url('images/controls.png') -86px -11px no-repeat;
+ margin: 0 3px;
+}
+.bx-wrapper .bx-controls-auto .bx-start:hover,
+.bx-wrapper .bx-controls-auto .bx-start.active,
+.bx-wrapper .bx-controls-auto .bx-start:focus {
+ background-position: -86px 0;
+}
+.bx-wrapper .bx-controls-auto .bx-stop {
+ display: block;
+ text-indent: -9999px;
+ width: 9px;
+ height: 11px;
+ outline: 0;
+ background: url('images/controls.png') -86px -44px no-repeat;
+ margin: 0 3px;
+}
+.bx-wrapper .bx-controls-auto .bx-stop:hover,
+.bx-wrapper .bx-controls-auto .bx-stop.active,
+.bx-wrapper .bx-controls-auto .bx-stop:focus {
+ background-position: -86px -33px;
+}
+/* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */
+.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager {
+ text-align: left;
+ width: 80%;
+}
+.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto {
+ right: 0;
+ width: 35px;
+}
+/* IMAGE CAPTIONS */
+.bx-wrapper .bx-caption {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ background: #666;
+ background: rgba(80, 80, 80, 0.75);
+ width: 100%;
+}
+.bx-wrapper .bx-caption span {
+ color: #fff;
+ font-family: Arial;
+ display: block;
+ font-size: .85em;
+ padding: 10px;
+}
diff --git a/src/images/bx_loader.gif b/src/images/bx_loader.gif
new file mode 100644
index 00000000..f4ff40ed
Binary files /dev/null and b/src/images/bx_loader.gif differ
diff --git a/src/images/controls.png b/src/images/controls.png
new file mode 100644
index 00000000..28918dde
Binary files /dev/null and b/src/images/controls.png differ
diff --git a/src/js/jquery.bxslider.js b/src/js/jquery.bxslider.js
new file mode 100644
index 00000000..aaa59b1c
--- /dev/null
+++ b/src/js/jquery.bxslider.js
@@ -0,0 +1,1669 @@
+/**
+ * bxSlider v4.2.17
+ * Copyright 2013-2017 Steven Wanderski
+ * Written while drinking Belgian ales and listening to jazz
+ * Licensed under MIT (http://opensource.org/licenses/MIT)
+ */
+
+;(function($) {
+
+ var defaults = {
+
+ // GENERAL
+ mode: 'horizontal',
+ slideSelector: '',
+ infiniteLoop: true,
+ hideControlOnEnd: false,
+ speed: 500,
+ easing: null,
+ slideMargin: 0,
+ startSlide: 0,
+ randomStart: false,
+ captions: false,
+ ticker: false,
+ tickerHover: false,
+ adaptiveHeight: false,
+ adaptiveHeightSpeed: 500,
+ video: false,
+ useCSS: true,
+ preloadImages: 'visible',
+ responsive: true,
+ slideZIndex: 50,
+ wrapperClass: 'bx-wrapper',
+
+ // TOUCH
+ touchEnabled: true,
+ swipeThreshold: 50,
+ oneToOneTouch: true,
+ preventDefaultSwipeX: true,
+ preventDefaultSwipeY: false,
+
+ // ACCESSIBILITY
+ ariaLive: true,
+ ariaHidden: true,
+
+ // KEYBOARD
+ keyboardEnabled: false,
+
+ // PAGER
+ pager: true,
+ pagerType: 'full',
+ pagerShortSeparator: ' / ',
+ pagerSelector: null,
+ buildPager: null,
+ pagerCustom: null,
+
+ // CONTROLS
+ controls: true,
+ nextText: 'Next',
+ prevText: 'Prev',
+ nextSelector: null,
+ prevSelector: null,
+ autoControls: false,
+ startText: 'Start',
+ stopText: 'Stop',
+ autoControlsCombine: false,
+ autoControlsSelector: null,
+
+ // AUTO
+ auto: false,
+ pause: 4000,
+ autoStart: true,
+ autoDirection: 'next',
+ stopAutoOnClick: false,
+ autoHover: false,
+ autoDelay: 0,
+ autoSlideForOnePage: false,
+
+ // CAROUSEL
+ minSlides: 1,
+ maxSlides: 1,
+ moveSlides: 0,
+ slideWidth: 0,
+ shrinkItems: false,
+
+ // CALLBACKS
+ onSliderLoad: function() { return true; },
+ onSlideBefore: function() { return true; },
+ onSlideAfter: function() { return true; },
+ onSlideNext: function() { return true; },
+ onSlidePrev: function() { return true; },
+ onSliderResize: function() { return true; },
+ onAutoChange: function() { return true; } //calls when auto slides starts and stops
+ };
+
+ $.fn.bxSlider = function(options) {
+
+ if (this.length === 0) {
+ return this;
+ }
+
+ // support multiple elements
+ if (this.length > 1) {
+ this.each(function() {
+ $(this).bxSlider(options);
+ });
+ return this;
+ }
+
+ // create a namespace to be used throughout the plugin
+ var slider = {},
+ // set a reference to our slider element
+ el = this,
+ // get the original window dimens (thanks a lot IE)
+ windowWidth = $(window).width(),
+ windowHeight = $(window).height();
+
+ // Return if slider is already initialized
+ if ($(el).data('bxSlider')) { return; }
+
+ /**
+ * ===================================================================================
+ * = PRIVATE FUNCTIONS
+ * ===================================================================================
+ */
+
+ /**
+ * Initializes namespace settings to be used throughout plugin
+ */
+ var init = function() {
+ // Return if slider is already initialized
+ if ($(el).data('bxSlider')) { return; }
+ // merge user-supplied options with the defaults
+ slider.settings = $.extend({}, defaults, options);
+ // parse slideWidth setting
+ slider.settings.slideWidth = parseInt(slider.settings.slideWidth);
+ // store the original children
+ slider.children = el.children(slider.settings.slideSelector);
+ // check if actual number of slides is less than minSlides / maxSlides
+ if (slider.children.length < slider.settings.minSlides) { slider.settings.minSlides = slider.children.length; }
+ if (slider.children.length < slider.settings.maxSlides) { slider.settings.maxSlides = slider.children.length; }
+ // if random start, set the startSlide setting to random number
+ if (slider.settings.randomStart) { slider.settings.startSlide = Math.floor(Math.random() * slider.children.length); }
+ // store active slide information
+ slider.active = { index: slider.settings.startSlide };
+ // store if the slider is in carousel mode (displaying / moving multiple slides)
+ slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1;
+ // if carousel, force preloadImages = 'all'
+ if (slider.carousel) { slider.settings.preloadImages = 'all'; }
+ // calculate the min / max width thresholds based on min / max number of slides
+ // used to setup and update carousel slides dimensions
+ slider.minThreshold = (slider.settings.minSlides * slider.settings.slideWidth) + ((slider.settings.minSlides - 1) * slider.settings.slideMargin);
+ slider.maxThreshold = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
+ // store the current state of the slider (if currently animating, working is true)
+ slider.working = false;
+ // initialize the controls object
+ slider.controls = {};
+ // initialize an auto interval
+ slider.interval = null;
+ // determine which property to use for transitions
+ slider.animProp = slider.settings.mode === 'vertical' ? 'top' : 'left';
+ // determine if hardware acceleration can be used
+ slider.usingCSS = slider.settings.useCSS && slider.settings.mode !== 'fade' && (function() {
+ // create our test div element
+ var div = document.createElement('div'),
+ // css transition properties
+ props = ['WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
+ // test for each property
+ for (var i = 0; i < props.length; i++) {
+ if (div.style[props[i]] !== undefined) {
+ slider.cssPrefix = props[i].replace('Perspective', '').toLowerCase();
+ slider.animProp = '-' + slider.cssPrefix + '-transform';
+ return true;
+ }
+ }
+ return false;
+ }());
+ // if vertical mode always make maxSlides and minSlides equal
+ if (slider.settings.mode === 'vertical') { slider.settings.maxSlides = slider.settings.minSlides; }
+ // save original style data
+ el.data('origStyle', el.attr('style'));
+ el.children(slider.settings.slideSelector).each(function() {
+ $(this).data('origStyle', $(this).attr('style'));
+ });
+
+ // perform all DOM / CSS modifications
+ setup();
+ };
+
+ /**
+ * Performs all DOM and CSS modifications
+ */
+ var setup = function() {
+ var preloadSelector = slider.children.eq(slider.settings.startSlide); // set the default preload selector (visible)
+
+ // wrap el in a wrapper
+ el.wrap('
');
+ // store a namespace reference to .bx-viewport
+ slider.viewport = el.parent();
+
+ // add aria-live if the setting is enabled and ticker mode is disabled
+ if (slider.settings.ariaLive && !slider.settings.ticker) {
+ slider.viewport.attr('aria-live', 'polite');
+ }
+ // add a loading div to display while images are loading
+ slider.loader = $('');
+ slider.viewport.prepend(slider.loader);
+ // set el to a massive width, to hold any needed slides
+ // also strip any margin and padding from el
+ el.css({
+ width: slider.settings.mode === 'horizontal' ? (slider.children.length * 1000 + 215) + '%' : 'auto',
+ position: 'relative'
+ });
+ // if using CSS, add the easing property
+ if (slider.usingCSS && slider.settings.easing) {
+ el.css('-' + slider.cssPrefix + '-transition-timing-function', slider.settings.easing);
+ // if not using CSS and no easing value was supplied, use the default JS animation easing (swing)
+ } else if (!slider.settings.easing) {
+ slider.settings.easing = 'swing';
+ }
+ // make modifications to the viewport (.bx-viewport)
+ slider.viewport.css({
+ width: '100%',
+ overflow: 'hidden',
+ position: 'relative'
+ });
+ slider.viewport.parent().css({
+ maxWidth: getViewportMaxWidth()
+ });
+ // apply css to all slider children
+ slider.children.css({
+ // the float attribute is a reserved word in compressors like YUI compressor and need to be quoted #48
+ 'float': slider.settings.mode === 'horizontal' ? 'left' : 'none',
+ listStyle: 'none',
+ position: 'relative'
+ });
+ // apply the calculated width after the float is applied to prevent scrollbar interference
+ slider.children.css('width', getSlideWidth());
+ // if slideMargin is supplied, add the css
+ if (slider.settings.mode === 'horizontal' && slider.settings.slideMargin > 0) { slider.children.css('marginRight', slider.settings.slideMargin); }
+ if (slider.settings.mode === 'vertical' && slider.settings.slideMargin > 0) { slider.children.css('marginBottom', slider.settings.slideMargin); }
+ // if "fade" mode, add positioning and z-index CSS
+ if (slider.settings.mode === 'fade') {
+ slider.children.css({
+ position: 'absolute',
+ zIndex: 0,
+ display: 'none'
+ });
+ // prepare the z-index on the showing element
+ slider.children.eq(slider.settings.startSlide).css({zIndex: slider.settings.slideZIndex, display: 'block'});
+ }
+ // create an element to contain all slider controls (pager, start / stop, etc)
+ slider.controls.el = $('');
+ // if captions are requested, add them
+ if (slider.settings.captions) { appendCaptions(); }
+ // check if startSlide is last slide
+ slider.active.last = slider.settings.startSlide === getPagerQty() - 1;
+ // if video is true, set up the fitVids plugin
+ if (slider.settings.video) { el.fitVids(); }
+ //preloadImages
+ if (slider.settings.preloadImages === 'none') {
+ preloadSelector = null;
+ }
+ else if (slider.settings.preloadImages === 'all' || slider.settings.ticker) {
+ preloadSelector = slider.children;
+ }
+ // only check for control addition if not in "ticker" mode
+ if (!slider.settings.ticker) {
+ // if controls are requested, add them
+ if (slider.settings.controls) { appendControls(); }
+ // if auto is true, and auto controls are requested, add them
+ if (slider.settings.auto && slider.settings.autoControls) { appendControlsAuto(); }
+ // if pager is requested, add it
+ if (slider.settings.pager) { appendPager(); }
+ // if any control option is requested, add the controls wrapper
+ if (slider.settings.controls || slider.settings.autoControls || slider.settings.pager) { slider.viewport.after(slider.controls.el); }
+ // if ticker mode, do not allow a pager
+ } else {
+ slider.settings.pager = false;
+ }
+ if (preloadSelector === null) {
+ start();
+ } else {
+ loadElements(preloadSelector, start);
+ }
+ };
+
+ var loadElements = function(selector, callback) {
+ var total = selector.find('img:not([src=""]), iframe').length,
+ count = 0;
+ if (total === 0) {
+ callback();
+ return;
+ }
+ selector.find('img:not([src=""]), iframe').each(function() {
+ $(this).one('load error', function() {
+ if (++count === total) { callback(); }
+ }).each(function() {
+ if (this.complete || this.src == '') { $(this).trigger('load'); }
+ });
+ });
+ };
+
+ /**
+ * Start the slider
+ */
+ var start = function() {
+ // if infinite loop, prepare additional slides
+ if (slider.settings.infiniteLoop && slider.settings.mode !== 'fade' && !slider.settings.ticker) {
+ var slice = slider.settings.mode === 'vertical' ? slider.settings.minSlides : slider.settings.maxSlides,
+ sliceAppend = slider.children.slice(0, slice).clone(true).addClass('bx-clone'),
+ slicePrepend = slider.children.slice(-slice).clone(true).addClass('bx-clone');
+ if (slider.settings.ariaHidden) {
+ sliceAppend.attr('aria-hidden', true);
+ slicePrepend.attr('aria-hidden', true);
+ }
+ el.append(sliceAppend).prepend(slicePrepend);
+ }
+ // remove the loading DOM element
+ slider.loader.remove();
+ // set the left / top position of "el"
+ setSlidePosition();
+ // if "vertical" mode, always use adaptiveHeight to prevent odd behavior
+ if (slider.settings.mode === 'vertical') { slider.settings.adaptiveHeight = true; }
+ // set the viewport height
+ slider.viewport.height(getViewportHeight());
+ // make sure everything is positioned just right (same as a window resize)
+ el.redrawSlider();
+ // onSliderLoad callback
+ slider.settings.onSliderLoad.call(el, slider.active.index);
+ // slider has been fully initialized
+ slider.initialized = true;
+ // add the resize call to the window
+ if (slider.settings.responsive) { $(window).on('resize', resizeWindow); }
+ // if auto is true and has more than 1 page, start the show
+ if (slider.settings.auto && slider.settings.autoStart && (getPagerQty() > 1 || slider.settings.autoSlideForOnePage)) { initAuto(); }
+ // if ticker is true, start the ticker
+ if (slider.settings.ticker) { initTicker(); }
+ // if pager is requested, make the appropriate pager link active
+ if (slider.settings.pager) { updatePagerActive(slider.settings.startSlide); }
+ // check for any updates to the controls (like hideControlOnEnd updates)
+ if (slider.settings.controls) { updateDirectionControls(); }
+ // if touchEnabled is true, setup the touch events
+ if (slider.settings.touchEnabled && !slider.settings.ticker) { initTouch(); }
+ // if keyboardEnabled is true, setup the keyboard events
+ if (slider.settings.keyboardEnabled && !slider.settings.ticker) {
+ $(document).keydown(keyPress);
+ }
+ };
+
+ /**
+ * Returns the calculated height of the viewport, used to determine either adaptiveHeight or the maxHeight value
+ */
+ var getViewportHeight = function() {
+ var height = 0;
+ // first determine which children (slides) should be used in our height calculation
+ var children = $();
+ // if mode is not "vertical" and adaptiveHeight is false, include all children
+ if (slider.settings.mode !== 'vertical' && !slider.settings.adaptiveHeight) {
+ children = slider.children;
+ } else {
+ // if not carousel, return the single active child
+ if (!slider.carousel) {
+ children = slider.children.eq(slider.active.index);
+ // if carousel, return a slice of children
+ } else {
+ // get the individual slide index
+ var currentIndex = slider.settings.moveSlides === 1 ? slider.active.index : slider.active.index * getMoveBy();
+ // add the current slide to the children
+ children = slider.children.eq(currentIndex);
+ // cycle through the remaining "showing" slides
+ for (i = 1; i <= slider.settings.maxSlides - 1; i++) {
+ // if looped back to the start
+ if (currentIndex + i >= slider.children.length) {
+ children = children.add(slider.children.eq(i - 1));
+ } else {
+ children = children.add(slider.children.eq(currentIndex + i));
+ }
+ }
+ }
+ }
+ // if "vertical" mode, calculate the sum of the heights of the children
+ if (slider.settings.mode === 'vertical') {
+ children.each(function(index) {
+ height += $(this).outerHeight();
+ });
+ // add user-supplied margins
+ if (slider.settings.slideMargin > 0) {
+ height += slider.settings.slideMargin * (slider.settings.minSlides - 1);
+ }
+ // if not "vertical" mode, calculate the max height of the children
+ } else {
+ height = Math.max.apply(Math, children.map(function() {
+ return $(this).outerHeight(false);
+ }).get());
+ }
+
+ if (slider.viewport.css('box-sizing') === 'border-box') {
+ height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom')) +
+ parseFloat(slider.viewport.css('border-top-width')) + parseFloat(slider.viewport.css('border-bottom-width'));
+ } else if (slider.viewport.css('box-sizing') === 'padding-box') {
+ height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom'));
+ }
+
+ return height;
+ };
+
+ /**
+ * Returns the calculated width to be used for the outer wrapper / viewport
+ */
+ var getViewportMaxWidth = function() {
+ var width = '100%';
+ if (slider.settings.slideWidth > 0) {
+ if (slider.settings.mode === 'horizontal') {
+ width = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
+ } else {
+ width = slider.settings.slideWidth;
+ }
+ }
+ return width;
+ };
+
+ /**
+ * Returns the calculated width to be applied to each slide
+ */
+ var getSlideWidth = function() {
+ var newElWidth = slider.settings.slideWidth, // start with any user-supplied slide width
+ wrapWidth = slider.viewport.width(); // get the current viewport width
+ // if slide width was not supplied, or is larger than the viewport use the viewport width
+ if (slider.settings.slideWidth === 0 ||
+ (slider.settings.slideWidth > wrapWidth && !slider.carousel) ||
+ slider.settings.mode === 'vertical') {
+ newElWidth = wrapWidth;
+ // if carousel, use the thresholds to determine the width
+ } else if (slider.settings.maxSlides > 1 && slider.settings.mode === 'horizontal') {
+ if (wrapWidth > slider.maxThreshold) {
+ return newElWidth;
+ } else if (wrapWidth < slider.minThreshold) {
+ newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.minSlides - 1))) / slider.settings.minSlides;
+ } else if (slider.settings.shrinkItems) {
+ newElWidth = Math.floor((wrapWidth + slider.settings.slideMargin) / (Math.ceil((wrapWidth + slider.settings.slideMargin) / (newElWidth + slider.settings.slideMargin))) - slider.settings.slideMargin);
+ }
+ }
+ return newElWidth;
+ };
+
+ /**
+ * Returns the number of slides currently visible in the viewport (includes partially visible slides)
+ */
+ var getNumberSlidesShowing = function() {
+ var slidesShowing = 1,
+ childWidth = null;
+ if (slider.settings.mode === 'horizontal' && slider.settings.slideWidth > 0) {
+ // if viewport is smaller than minThreshold, return minSlides
+ if (slider.viewport.width() < slider.minThreshold) {
+ slidesShowing = slider.settings.minSlides;
+ // if viewport is larger than maxThreshold, return maxSlides
+ } else if (slider.viewport.width() > slider.maxThreshold) {
+ slidesShowing = slider.settings.maxSlides;
+ // if viewport is between min / max thresholds, divide viewport width by first child width
+ } else {
+ childWidth = slider.children.first().width() + slider.settings.slideMargin;
+ slidesShowing = Math.floor((slider.viewport.width() +
+ slider.settings.slideMargin) / childWidth) || 1;
+ }
+ // if "vertical" mode, slides showing will always be minSlides
+ } else if (slider.settings.mode === 'vertical') {
+ slidesShowing = slider.settings.minSlides;
+ }
+ return slidesShowing;
+ };
+
+ /**
+ * Returns the number of pages (one full viewport of slides is one "page")
+ */
+ var getPagerQty = function() {
+ var pagerQty = 0,
+ breakPoint = 0,
+ counter = 0;
+ // if moveSlides is specified by the user
+ if (slider.settings.moveSlides > 0) {
+ if (slider.settings.infiniteLoop) {
+ pagerQty = Math.ceil(slider.children.length / getMoveBy());
+ } else {
+ // when breakpoint goes above children length, counter is the number of pages
+ while (breakPoint < slider.children.length) {
+ ++pagerQty;
+ breakPoint = counter + getNumberSlidesShowing();
+ counter += slider.settings.moveSlides <= getNumberSlidesShowing() ? slider.settings.moveSlides : getNumberSlidesShowing();
+ }
+ return counter;
+ }
+ // if moveSlides is 0 (auto) divide children length by sides showing, then round up
+ } else {
+ pagerQty = Math.ceil(slider.children.length / getNumberSlidesShowing());
+ }
+ return pagerQty;
+ };
+
+ /**
+ * Returns the number of individual slides by which to shift the slider
+ */
+ var getMoveBy = function() {
+ // if moveSlides was set by the user and moveSlides is less than number of slides showing
+ if (slider.settings.moveSlides > 0 && slider.settings.moveSlides <= getNumberSlidesShowing()) {
+ return slider.settings.moveSlides;
+ }
+ // if moveSlides is 0 (auto)
+ return getNumberSlidesShowing();
+ };
+
+ /**
+ * Sets the slider's (el) left or top position
+ */
+ var setSlidePosition = function() {
+ var position, lastChild, lastShowingIndex;
+ // if last slide, not infinite loop, and number of children is larger than specified maxSlides
+ if (slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop) {
+ if (slider.settings.mode === 'horizontal') {
+ // get the last child's position
+ lastChild = slider.children.last();
+ position = lastChild.position();
+ // set the left position
+ setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.outerWidth())), 'reset', 0);
+ } else if (slider.settings.mode === 'vertical') {
+ // get the last showing index's position
+ lastShowingIndex = slider.children.length - slider.settings.minSlides;
+ position = slider.children.eq(lastShowingIndex).position();
+ // set the top position
+ setPositionProperty(-position.top, 'reset', 0);
+ }
+ // if not last slide
+ } else {
+ // get the position of the first showing slide
+ position = slider.children.eq(slider.active.index * getMoveBy()).position();
+ // check for last slide
+ if (slider.active.index === getPagerQty() - 1) { slider.active.last = true; }
+ // set the respective position
+ if (position !== undefined) {
+ if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }
+ else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }
+ }
+ }
+ };
+
+ /**
+ * Sets the el's animating property position (which in turn will sometimes animate el).
+ * If using CSS, sets the transform property. If not using CSS, sets the top / left property.
+ *
+ * @param value (int)
+ * - the animating property's value
+ *
+ * @param type (string) 'slide', 'reset', 'ticker'
+ * - the type of instance for which the function is being
+ *
+ * @param duration (int)
+ * - the amount of time (in ms) the transition should occupy
+ *
+ * @param params (array) optional
+ * - an optional parameter containing any variables that need to be passed in
+ */
+ var setPositionProperty = function(value, type, duration, params) {
+ var animateObj, propValue;
+ // use CSS transform
+ if (slider.usingCSS) {
+ // determine the translate3d value
+ propValue = slider.settings.mode === 'vertical' ? 'translate3d(0, ' + value + 'px, 0)' : 'translate3d(' + value + 'px, 0, 0)';
+ // add the CSS transition-duration
+ el.css('-' + slider.cssPrefix + '-transition-duration', duration / 1000 + 's');
+ if (type === 'slide') {
+ // set the property value
+ el.css(slider.animProp, propValue);
+ if (duration !== 0) {
+ // add a callback method - executes when CSS transition completes
+ el.on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e) {
+ //make sure it's the correct one
+ if (!$(e.target).is(el)) { return; }
+ // remove the callback
+ el.off('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
+ updateAfterSlideTransition();
+ });
+ } else { //duration = 0
+ updateAfterSlideTransition();
+ }
+ } else if (type === 'reset') {
+ el.css(slider.animProp, propValue);
+ } else if (type === 'ticker') {
+ // make the transition use 'linear'
+ el.css('-' + slider.cssPrefix + '-transition-timing-function', 'linear');
+ el.css(slider.animProp, propValue);
+ if (duration !== 0) {
+ el.on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e) {
+ //make sure it's the correct one
+ if (!$(e.target).is(el)) { return; }
+ // remove the callback
+ el.off('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
+ // reset the position
+ setPositionProperty(params.resetValue, 'reset', 0);
+ // start the loop again
+ tickerLoop();
+ });
+ } else { //duration = 0
+ setPositionProperty(params.resetValue, 'reset', 0);
+ tickerLoop();
+ }
+ }
+ // use JS animate
+ } else {
+ animateObj = {};
+ animateObj[slider.animProp] = value;
+ if (type === 'slide') {
+ el.animate(animateObj, duration, slider.settings.easing, function() {
+ updateAfterSlideTransition();
+ });
+ } else if (type === 'reset') {
+ el.css(slider.animProp, value);
+ } else if (type === 'ticker') {
+ el.animate(animateObj, duration, 'linear', function() {
+ setPositionProperty(params.resetValue, 'reset', 0);
+ // run the recursive loop after animation
+ tickerLoop();
+ });
+ }
+ }
+ };
+
+ /**
+ * Populates the pager with proper amount of pages
+ */
+ var populatePager = function() {
+ var pagerHtml = '',
+ linkContent = '',
+ pagerQty = getPagerQty();
+ // loop through each pager item
+ for (var i = 0; i < pagerQty; i++) {
+ linkContent = '';
+ // if a buildPager function is supplied, use it to get pager link value, else use index + 1
+ if (slider.settings.buildPager && $.isFunction(slider.settings.buildPager) || slider.settings.pagerCustom) {
+ linkContent = slider.settings.buildPager(i);
+ slider.pagerEl.addClass('bx-custom-pager');
+ } else {
+ linkContent = i + 1;
+ slider.pagerEl.addClass('bx-default-pager');
+ }
+ // var linkContent = slider.settings.buildPager && $.isFunction(slider.settings.buildPager) ? slider.settings.buildPager(i) : i + 1;
+ // add the markup to the string
+ pagerHtml += '
';
+ }
+ // populate the pager element with pager links
+ slider.pagerEl.html(pagerHtml);
+ };
+
+ /**
+ * Appends the pager to the controls element
+ */
+ var appendPager = function() {
+ if (!slider.settings.pagerCustom) {
+ // create the pager DOM element
+ slider.pagerEl = $('');
+ // if a pager selector was supplied, populate it with the pager
+ if (slider.settings.pagerSelector) {
+ $(slider.settings.pagerSelector).html(slider.pagerEl);
+ // if no pager selector was supplied, add it after the wrapper
+ } else {
+ slider.controls.el.addClass('bx-has-pager').append(slider.pagerEl);
+ }
+ // populate the pager
+ populatePager();
+ } else {
+ slider.pagerEl = $(slider.settings.pagerCustom);
+ }
+ // assign the pager click binding
+ slider.pagerEl.on('click touchend', 'a', clickPagerBind);
+ };
+
+ /**
+ * Appends prev / next controls to the controls element
+ */
+ var appendControls = function() {
+ slider.controls.next = $('' + slider.settings.nextText + '');
+ slider.controls.prev = $('' + slider.settings.prevText + '');
+ // add click actions to the controls
+ slider.controls.next.on('click touchend', clickNextBind);
+ slider.controls.prev.on('click touchend', clickPrevBind);
+ // if nextSelector was supplied, populate it
+ if (slider.settings.nextSelector) {
+ $(slider.settings.nextSelector).append(slider.controls.next);
+ }
+ // if prevSelector was supplied, populate it
+ if (slider.settings.prevSelector) {
+ $(slider.settings.prevSelector).append(slider.controls.prev);
+ }
+ // if no custom selectors were supplied
+ if (!slider.settings.nextSelector && !slider.settings.prevSelector) {
+ // add the controls to the DOM
+ slider.controls.directionEl = $('');
+ // add the control elements to the directionEl
+ slider.controls.directionEl.append(slider.controls.prev).append(slider.controls.next);
+ // slider.viewport.append(slider.controls.directionEl);
+ slider.controls.el.addClass('bx-has-controls-direction').append(slider.controls.directionEl);
+ }
+ };
+
+ /**
+ * Appends start / stop auto controls to the controls element
+ */
+ var appendControlsAuto = function() {
+ slider.controls.start = $('
');
+ // add the controls to the DOM
+ slider.controls.autoEl = $('');
+ // on click actions to the controls
+ slider.controls.autoEl.on('click', '.bx-start', clickStartBind);
+ slider.controls.autoEl.on('click', '.bx-stop', clickStopBind);
+ // if autoControlsCombine, insert only the "start" control
+ if (slider.settings.autoControlsCombine) {
+ slider.controls.autoEl.append(slider.controls.start);
+ // if autoControlsCombine is false, insert both controls
+ } else {
+ slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop);
+ }
+ // if auto controls selector was supplied, populate it with the controls
+ if (slider.settings.autoControlsSelector) {
+ $(slider.settings.autoControlsSelector).html(slider.controls.autoEl);
+ // if auto controls selector was not supplied, add it after the wrapper
+ } else {
+ slider.controls.el.addClass('bx-has-controls-auto').append(slider.controls.autoEl);
+ }
+ // update the auto controls
+ updateAutoControls(slider.settings.autoStart ? 'stop' : 'start');
+ };
+
+ /**
+ * Appends image captions to the DOM
+ */
+ var appendCaptions = function() {
+ // cycle through each child
+ slider.children.each(function(index) {
+ // get the image title attribute
+ var title = $(this).find('img:first').attr('title');
+ // append the caption
+ if (title !== undefined && ('' + title).length) {
+ $(this).append('