
#King fluid image slider code
Replaced core code from FlexSlider to Swipe.Set img, video, and iframe width to 100%.iFrame videos stop playing when user leaves current slide.

Moved feature test to script itself for better progressive enhancement.Switched to a data attribute for the toggle selector (separates scripts from styles).Added support to pause HTML5 videos on a slide transition.
#King fluid image slider windows
Added Windows Phone touch event support.The code is available under the MIT License.
#King fluid image slider update
Don't forget to update the version number, the changelog (in the readme.md file), and when applicable, the documentation. In lieu of a formal style guide, take care to maintain the existing coding style. If the JavaScript file fails to load, or if your site is viewed on older and less capable browsers, all content will be displayed by default. Slider is built with modern JavaScript APIs, and uses progressive enhancement. Slider works in all modern browsers, and IE 9 and above.


GetPos() - Returns current slide index position Write your own functions using these API functions: The navigation elements, slide count and keyboard navigation for Slider were all created by tapping into the simple, powerful API included in Swipe. sliderInit = ( function ( window, document, undefined ) ) ( window, document ) Īnd that's it, you're done. TransitionEnd (function) - runs at the end slide transition. StopPropagation (boolean, default: false) - stop event propagationĬallback (function) - runs at slide change. Speed (integer, default: 300) - speed of prev and next transitions in milliseconds.Īuto (integer, begin with auto slideshow: time in milliseconds between slides)Ĭontinuous (boolean, default: true) - create an infinite feel with no endpointsĭisableScroll (boolean, default: false) - stop any touches on this container from scrolling the page StartSlide (integer, default: 0) - index position Swipe should start at This is where you can change the Slider navigation and position content, turn on auto-rotation (but please don't - that sucks), and more. In the footer of your HTML document, activate Slider and configure your settings. They don't have to be div elements, as long as the data attributes are left intact and they're contained within the section, and can be moved around or styled with CSS however you see fit. Slider will dynamically add navigation elements and slide position content to them. The and sections are optional (though I'm assuming you'd want some type of navigation buttons). If you still need or want to use a slider, checkout: I won't be closing the repository, so you'll still be able to access the script and documentation, but I won't be supporting or maintaining it any longer. When they do serve a focused purpose (for example, image carousels), an alternate design pattern would often better serve the user's goals (for example, just displaying all of the images full-width in a stack).īeyond pure UX-driven reasons, there are numerous bugs that keep popping up, the original script this was forked from ( SwipeJS) is no longer being maintained. They often represent an inability of key stakeholders to reach consensus. Increasing amounts of data indicate how ineffective sliders are are driving business goals in web design. Neither currently open nor new issues will be addressed. Slider has been deprecated and is no longer maintained. Slider is a fork of Swipe, modified for progressive enhancement, with a few added features and bug fixes.

A simple, responsive, touch-enabled image slider.
