A Lightweight jQuery Plugin for Animating Split-Flap Displays | fallblatt

fallblatt is a lightweight jQuery plugin for animating split screens. This jQuery plugin allows you to include such offers in your web application. Everything from virtual departure and arrival panels to digital dashboards can be run with this single plugin.

Table of Contents

getting started

Quick start

To get an overview of what Fallblatt can do, open Fallblatt.html your browser and enjoy the show. The plugin expands the Fallblatt board to screen size and randomly picks new characters for each flap.

If you want to change the size of the flaps, you can increase or decrease the flapScale option of the FallBlatt() object. The plugin will always try to arrange the panels evenly within the specified box.

The entire panel design can be easily modified by changing the respective CSS classes. Take a look at the imported file.

requirements

The jQuery plugin is used as a strict dependency. Make sure to load a fresh version of jQuery before instantiating a new fallBlatt().

The default Fallblatt attempts to fit itself inside the original box that is provided to display the canvas. If the size of the flaps or the gauge does not allow at least one flap to be positioned, the flaps will go out with an error in the control unit.

CSS

To modify the overall style of the split canvas, you can provide a different set of classes using flapCss.

Must Read: Half-character Style Using jQuery and CSS | Splitchar.js

How to make use of it:

1. Link to jQuery JavaScript library and Fallblatt's information within the document.

<link href="/path/to/css/fallblatt.css" rel="stylesheet" />
<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/src/fallblatt.js"></script>

2. Create a container to hold the split-flap display.

<div id="splitFlapExample"></div>

3. Create a new instance of the split-flap display.

$("#splitFlapExample").fallBlatt({
  // options here
})

4. Display your content within the split-flap display. This returns a $.Deferred().promise() for ready until the text is displayed.

$("#splitFlapCanvas").fallBlatt("display", {

  // customize position here
  pos: [x,y],
    
  // text to animate
  content: "A"
  
});

5. Customize the animation with the next options.

$("#splitFlapExample").fallBlatt({
  flapHeight: 120,
  flapWidth: 90,
  flapScale: 1,
  flapSpacingExtraHeight: 0,
  flapSpacingExtraWidth: 0,
  flapCharset: {
    // Index 0 is the default character (space)
    // If an unknown character is observed, the last char from the list will be used
    chars: " 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ'‘?’“!”(%)[#]{@}/&\\<-_+÷×=>$€:;,.~*rbgyow",
    options: {
      // "CHAR": [List of classes to attach to this char]
      "(": ["splitFlapCharBrackets"],
      "%": ["splitFlapCharSpecial"],
      ")": ["splitFlapCharBrackets"],
      "[": ["splitFlapCharBrackets"],
      "#": ["splitFlapCharSpecial"],
      "]": ["splitFlapCharBrackets"],
      "{": ["splitFlapCharBrackets"],
      "@": ["splitFlapCharSpecial"],
      "}": ["splitFlapCharBrackets"],
      "/": ["splitFlapCharBrackets"],
      "&": ["splitFlapCharSpecial"],
      "\\": ["splitFlapCharBrackets"],
      "_": ["splitFlapCharExtremes"],
      "$": ["splitFlapCharSpecial"],
      ":": ["splitFlapCharExtremes"],
      ";": ["splitFlapCharExtremes"],
      ",": ["splitFlapCharExtremes"],
      "~": ["splitFlapCharTilde"],
      "*": ["splitFlapCharAsterisk"],
      "r": ["splitFlapCharColourBase", "splitFlapCharColourRed"],
      "b": ["splitFlapCharColourBase", "splitFlapCharColourBlue"],
      "g": ["splitFlapCharColourBase", "splitFlapCharColourGreen"],
      "y": ["splitFlapCharColourBase", "splitFlapCharColourYellow"],
      "o": ["splitFlapCharColourBase", "splitFlapCharColourOrange"],
      "w": ["splitFlapCharColourBase", "splitFlapCharColourWhite"]
    }
  },
  flapCss: {
    flapContainerScaleClass: "splitFlapScaleLayer",
    flapContainerClass: "splitFlapContainer",
    flapContainerDividerBaseClass: "splitFlapContainerDividerBase",
    flapContainerDividerClass: "splitFlapContainerDivider",
    flapContainerDividerLinkLeftClass: "splitFlapContainerDividerLinkLeft",
    flapContainerDividerLinkRightClass: "splitFlapContainerDividerLinkRight",
    flapContainerCharClass: "splitFlapContainerChar"
  }
})

Animating-Split-Flap-Displays-fallblatt-Demo

Options

A new instance of fallBlatt() accepts the following parameters:

Must Read: [Splitter/Resizer] A Simple and Easy Slider to Resize Two Side-by-Side Flexboxes

KeyDefaultComment
flapHeight120If changed, the charset also needs to be aligned. Use flapScale if you just want to change the size of the flaps.
flapWidth90If changed, the charset also needs to be aligned. Use flapScale if you just want to change the size of the flaps.
flapScale1
flapSpacingExtraHeight0If the plugin renders multiple rows of flaps, you can increase their spacing.
flapSpacingExtraWidth0If the plugin renders multiple columns of flaps, you can increase their spacing.
flapCharsetDefault charsetProvide a custom charset for the fallblatt plugin. The default charset supports a standard set of characters and colors.
flapCssDefault CSSOverwrite the design of fallblatt elements

See Demo And Download

Animating-Split-Flap-Displays-fallblatt

Official Website(Roosterfish): Click Here

This superior jQuery/javascript plugin is developed by Roosterfish. For extra Advanced Usage, please go to the official website.

Related Posts

drag-drop-file-5x5-jq-uploader

Responsive Drag and Drop File Uploader/Download Plugin | 5x5_jq_uploader

5x5_jq_uploader plugin can be used to instantly create a drop file area and file queue with a little bit of preparation. Bootstrap is used for responsive planning…

Bootstrap-Dark-Mode

Stylesheet For Implementing Dark Mode with Bootstrap

Bootstrap Dark Mode provides a style sheet and two texts that allow you to implement Dark Mode on your website. Initially loaded based on user preferences, can…

responsive-navigation-menu

Multi-purpose Navigation Menu for Javascript Library | jQuery Corenav

coreNavigation is a multipurpose navigation menu for a jquery based javascript library, comes with more style, and is easy to integrate. 11 Default Menu 2 Responsive Navigation…

Simple-Multi-Select-Dropdown-Pure-Vanilla-Javascript

Simple Multi-Select Dropdown Pure Vanilla Javascript | multiSelect.js

MultiSelect.js is a simple, clean, and progressive JavaScript library designed for easy integration with any type of project or system. The design was heavily influenced by the…

Confetti-Falling-Animation-Effect-party

Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…

how-to-create-popup-in-html-with-css

How To Create A Popup in HTML with CSS

How to create popup in html with css – Popup without JavaScript is an elegant pop-up panel component with an animated scale, written in CSS. Have you…

Leave a Reply

Your email address will not be published. Required fields are marked *