Slider

A slide/swipe library for mobile and desktop devices.

This is a package I wrote and used in several of my projects. It offers slide/swipe functionality for content inside a carousel. I wanted to create a slider that was lightweight and simple for others to integrate into their projects. I also wanted it to be fast and responsive so it would behave itself when the browser window was resized.

There were existing slider modules available, but they all required third party packages such as jQuery. I wanted to see if I could create something neat and fast using plain Javascript.

I limited browser support to the latest two versions of each of the main browsers. Maintaining legacy support was not needed so this would lessen the need for ugly hacks.

To develop this project, here are the list of features I wanted it to have:

  • Support the latest two versions of all major browsers (including IE10).
  • Work with very simple html and css and be easy and intuitive to set up.
  • Make use of Request Animation Frame as part of the WebAPI for better performance.
  • Fire events for the plugin user when certain things happen, like the slide animation completing.

This plugin was tested on several devices, from an entry level Android phone to an iMac desktop. This package is no longer maintained, but it can be seen as an archived project on GitHub.