- Overview
- Documents
Flip Out Cards is a jQuery plugin that create a dynamic multi level flip out cards.
Source: github.com
1. INCLUDE CSS AND JS FILES
<link href='flipout_cards/flipout_cards.css' rel='stylesheet' type='text/css'> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript" src="flipout_cards/jquery.flipout_cards.js"></script>
2. HTML
<div class="flipout"> <div class="foc-main"> ... </div> <div class="foc-left"> ... </div> ... </div>
The container with the class name foc-main will be the main content area where the cards will flip out from. All the other containers below that will be the cards itself. You can have as many cards as you like. Simply duplicate the container with the class name foc-left and the plugin will automatically stack it all up in order.
You can also define which direction the cards will appear by simply changing the class name of the cards' container. Available class names are foc-left, foc-right, foc-top, and foc-bottom.
3. JAVASCRIPT
$(".flipout").flipout_cards({ animation: "flipOut", // Animations available are: flipOut, slideOut and foldOut. The default value is flipOut beforeOpen: function () {}, // This option accepts a callback function. The function will be called before the flip open animation starts. afterOpen: function () {}, // This option accepts a callback function. The function will be called after the flip open animation finishes. beforeClose: function () {}, // This option accepts a callback function. The function will be called before the flip close animation starts. afterClose: function () {} // This option accepts a callback function. The function will be called after the flip close animation finishes. });
4. CALLBACKS
You can use callbacks to perform actions before or after the card displays:
This option accepts a callback function. The function will be called before the flip open animation starts.
$(".flipout").flipout_cards({ beforeOpen: function () { ... } });
This option accepts a callback function. The function will be called before the flip open animation finishes.
$(".flipout").flipout_cards({ afterOpen: function () { ... } });
This option accepts a callback function. The function will be called before the flip close animation starts.
$(".flipout").flipout_cards({ beforeClose: function () { ... } });
This option accepts a callback function. The function will be called before the flip close animation finishes.
$(".flipout").flipout_cards({ afterClose: function () { ... } });