After downloading the module into your project, you can import the library into your script.
import {
mainContainer, flipCardHover, flipCardClick, bookAnimation, bookFlip
} from './CardAndBookFlipping/Flipping.js';
mainContainer({});
flipCardHover({
width: 350,
height: 200,
transitionLength: 1
});
flipCardClick({
width: 350,
height: 200,
transitionLength: 1
});
bookFlip({
width: 200,
height: 275,
transitionLength: 0.75
});
bookAnimation({
width: 200,
height: 275,
transitionLength: 1
});
Description: function to set up the container for cards or books
Description: function to configure hover card flipping
Description: function to configure click card flipping
Description: function to configure hover book flipping
Description: function to configure hover for book animation
Default: 250px
Description: Width of the Card or Book
Default: 320px
Description: Width of the Card or Book
Default: 1s
Description: Width of the Card or Book
<div class="mainContainer">
[Insert Card/Book code]
</div>
<div class="card clickCard">
<div class="frontCard">
...
</div>
<div class="backCard">
...
</div>
</div>
<div class="card hoverCard">
<div class="frontCard">
...
</div>
<div class="backCard">
...
</div>
</div>
<div class="mainContainer allowEditCards"></div>
<div class="bookContainer">
<div class="book" id="book1">
<img src="[IMG SOURCE]" alt="">
</div>
</div>
<div class="bookFlip">
<div class="flip">
<div class="frontCover">
...
</div>
<div class="backCover">
...
</div>
</div>
<div class="contentCover">
...
</div>
</div>
(DEMO: Showing flipping the front and the back of the card by clicking on it)
(DEMO: Showing flipping the front and the back of the card by hovering on it)
(DEMO: Adding and removing Card with the complex hover and click flip card functionality )
(DEMO: Showing digital book in a book form )
(DEMO: Flip Book Page )