Freebie: Responsive jQuery Slider Plugin Flexslider

Advertisement

When it comes to responsive design, it’s not just about fluid images or adaptive layouts. It’s also about the responsive methodology behind the entire design process. In responsive design, we are creating responsive experiences, meaning that all design components need to be able to adapt to the environment in which they are displayed and have to interact with. This is why we create tables, navigation menus, videos and other design elements responsive as well (see Responsive Web Design Techniques and Design Strategies1 for more details). It just makes sense to consider each and every design component — including the image slider.

In this post, we are glad to release a responsive jQuery slider plugin Flexslider which has been created, developed and maintained by Tyler Smith2 and released for Smashing Magazine and its readers. As usual, the plugin is absolutely free to use in private and commerical projects. The plugin includes fade and slide animations, customizable options as well as all the navigation options you would expect in such a plugin — touch gestures inclusive! It uses simple, semantic markup to create the slider and is lightweight, weighing only 5 Kb (minified). The plugin has been tested in Safari 4+, Chrome 4+, Firefox 3.6+, Opera 10+, and IE7+. iOS and Android devices are supported as well. In three simple steps, you can have a fully responsive slider for your responsive design.

3

Download the Plugin for Free!

The plugin is released under the MIT license. You can use it for all your projects for free and without any restrictions. Please link to this article if you want to spread the word. You may modify the plugin as you wish.

Screenshot4

Features

  • Simple, semantic markup.
  • Supported in Safari 4+, Chrome 4+, Firefox 3.6+, Opera 10+, and IE7+.
  • iOS and Android devices are supported as well.
  • Slide and Fade animations.
  • Highly customizable slider options.
  • Directional, keyboard, and touch swipe navigation.
  • Lightweight (5 Kb minified).
  • You can use all HTML elements in the slides.
  • Free to use under the MIT license.

headshot9
You can find the installation guide and documentation on the developer’s release site10.

Behind the Design

As always, here are some insights from the designer:

“My motivation behind creating this plugin was the difficulty I had building my first responsive slider. There were no resources to pull from and I spent hours banging my head against the wall working through the logic. My goal was to make it easier for others doing the same thing. I wanted to build a plugin that served the newest of beginners, while providing seasoned developers a tool they could use with confidence.

FlexSlider serves beginners by being virtually plug and play, needing only the FlexSlider files and some images to get started. To seasoned developers, FlexSlider should be seen as a tool that gets them rolling quickly. It doesn’t add unnecessary markup and gives complete freedom to use any HTML element within each slide.

The most exciting thing about FlexSlider at this point, in my mind, is the slide animation. It was a challenge to construct, but the resulting responsive behavior is very cool. When you mix the slide animation with touch gestures, it creates a great experience across iOS and Android devices.

Problems I encountered when building the plugin was ensuring that the plugin would work across all different types of responsive builds, browsers, and devices. To accomplish that, I made sure the plugin did exactly what it needed too, and nothing more. For example, many sliders use fixed dimensions and absolute positioning to create animation effects, but this is not possible with fully fluid responsive design. Avoiding this practice, I limited my use of the $(window).resize() function and let the slider dimensions remain organic to the content within. The downside to this is that the fade animations can’t overlap, which is indeed a nice effect.

The most important lessons I’ve learned are that overusing (window).resize() function to control element sizing will make you cringe, which is why you won’t find much at all in FlexSlider. Keep your responsive design as light as you can. Remember the audiences you are extending to reach are on far less capable devices, especially with JavaScript.

If you are having a problem installing FlexSlider, post a comment in the Community section and I will respond. Follow @mbmufffin11 for FlexSlider updates!”

Thank you, Tyler. We sincerely appreciate your work and your good intentions.

Footnotes

  1. 1 http://www.smashingmagazine.com/2011/07/22/responsive-web-design-techniques-tools-and-design-strategies/
  2. 2 http://www.madebymufffin.com
  3. 3 http://flex.madebymufffin.com/demo/
  4. 4 http://flex.madebymufffin.com/demo/
  5. 5 http://flex.madebymufffin.com/demo/
  6. 6 http://www.smashingmagazine.com/wp-content/uploads/uploader/images/flexslider/full_preview.jpg
  7. 7 http://www.smashingmagazine.com/wp-content/uploads/2011/08/Flexslider-jQuery-Plugin.zip
  8. 8 http://flex.madebymufffin.com
  9. 9 http://flex.madebymufffin.com/demo/
  10. 10 http://flex.madebymufffin.com/
  11. 11 http://www.twitter.com/mbmufffin

↑ Back to top Tweet itShare on Facebook

The Smashing team loves high-quality content and cares about the little details. Through our online articles, Smashing Books, eBooks as well as Smashing Conferences, we are committed to stimulating creativity and strengthening the web design community’s creative forces.

Advertisement
  1. 1

    implemetation?

    0
  2. 52

    I installed this FlexSlider, then I didn’t like it, then I switched over to NivoSlider and apply a TouchSwipe plugin with it. Then I didn’t like it. And then I went back to this FlexSlider.

    0
  3. 103

    Nice slider…
    but its doesn’t have floated example with content…

    0
  4. 154

    Awesome it works great on mobile devices, really saved me tones of time.

    Thx for sharing.

    0

↑ Back to top