back to webplate
SCROLLDOWN
  • A cool jQuery plugin that lets you flick through content
  • So simple to use, fully responsive and touch enabled
  • Hard to believe that it's only 12kb in size

Get The Plugin

You can download Flickerplate as a zip file directly or for the latest version get it via Github. Note that this plugin is included within Webplate by default.

Getting Started

This plugin is by definition a jQuery plugin and so is required. It also requires Modernizr for touch detection and the jQuery.Finger library for touch events. Both jQuery and a custom build of Modernizr are supplied in the zip package.

See an example below of a basic include.

  1. <head>
  2. // Required javascript
  3. <script src = "js/min/jquery-v1.10.2.min.js" ></script>
  4. <script src = "js/min/modernizr-custom-v2.7.1.min.js" ></script>
  5. <script src = "js/min/jquery-finger-v0.1.0.min.js" ></script>
  6. // Flickerplate
  7. <script src = "js/min/flickerplate.min.js" ></script>
  8. <link href = "css/flickerplate.css" rel = "stylesheet" type = "text/css" >
  9. </head>

Executing Flickerplate

The plugin is executed via Javascript and can be called on any containing class as long as the inner HTML is correct. See an example of both below.

HTML

  1. <div class = "flicker-example" >
  2. <ul>
  3. <li>
  4. <div class = "flick-title" > Title 1 </div>
  5. <div class = "flick-sub-text" > Text line 1 </div>
  6. </li>
  7. <li>
  8. <div class = "flick-title" > Title 2 </div>
  9. <div class = "flick-sub-text" > Text line 2 </div>
  10. </li>
  11. <li>
  12. <div class = "flick-title" > Title 3 </div>
  13. <div class = "flick-sub-text" > Text line 3 </div>
  14. </li>
  15. </ul>
  16. </div>

JAVASCRIPT

  1. <script>
  2. $(document).ready(function(){
  3. $('.flicker-example').flicker();
  4. });
  5. </script>

Options

Flickerplate is configurable through a variety of ways. You can either setup the options through the Javascript call or you can set the options via data attributes on the actual element. Some options can even be set globally and on each list item.

Name Default JS Data Explanation
ArrowstruearrowsarrowsArrows are used to navigate back and forth between the flicks.
Arrows Constraintfalsearrows_constraintarrows-constraintWhen you get to the end of the flicks pressing the next arrow will navigate you to the beginning again should you have a false constraint. The same applies to the previous arrow.
Auto Flicktrueauto_flickauto-flickSets the flick to run automatically. A manual flick resets the delay.
Auto Flick Delay10auto_flick_delayauto-flick-delaySet the delay (in seconds) between each auto flick.
Background ImagebackgroundSet a background image for a particular list item. The image will cover the entire element and is set on a list item level only.
Block Texttrueblock_textblock-textWill class the title and sub text classes of each list item to show a background colour for easy reading. Can be applied to the containing class for a global effect or to each list item separately.
Dot Alignmentcenterdot_alignmentdot-alignmentSet the horizontal alignment of the dots to either left, center or right.
Dot Navigationtruedot_navigationdot-navigationDot navigation is used to indicate and navigate between the flicks.
Flick Animationtransition-slideflick_animationflick-animationChoose the animation type you want to use for each flick. The options are transition-slide, transform-slide, jquery-slide, scroller-slide. Transform is used on mobile devices by default.
Flick Position1flick_positionflick-positionSet the starting flick.
ThemelightthemethemeCurrently two options, light and dark. This will set the font colour, block text colour, arrows and dots to either dark or light. Can be applied to the containing class for a global effect or to each list item seperately.

JAVASCRIPT EXAMPLE

  1. <script>
  2. $(document).ready(function(){
  3.  
  4. $('.flicker-example').flicker({
  5. arrows : true,
  6. arrows_constraint : false,
  7. auto_flick : true,
  8. auto_flick_delay : 10,
  9. block_text : true,
  10. dot_alignment : 'center',
  11. dot_navigation : true,
  12. flick_animation : 'transition-slide',
  13. flick_position : 1,
  14. theme : 'light'
  15. });
  16. });
  17. </script>

DATA ATTRIBUTE EXAMPLE

  1. <div class="flicker-example" data-auto-flick-delay="6" data-dot-alignment="left" data-theme="light">
  2. <ul>
  3. <li data-block-text="false">
  4. <div class="flick-title">Title 1</div>
  5. <div class="flick-sub-text">Text line 1</div>
  6. </li>
  7. <li data-theme="dark">
  8. <div class="flick-title">Title 2</div>
  9. <div class="flick-sub-text">Text line 2</div>
  10. </li>
  11. <li data-background="images/some-background.png">
  12. <div class="flick-title">Title 3</div>
  13. <div class="flick-sub-text">Text line 3</div>
  14. </li>
  15. </ul>
  16. </div>

In the above example we show how you can mix options like theme and block text between a global setting and a per list item setting.