1.1.2 • Published 8 years ago

flippant-js v1.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

flippant-js

Please Note:

This fork was made to solve some issues I was having with this plugin, and may not work for you. Feel free to use it if you want, just know that I won't necessarily address any issues that arise with it.

Description:

  • Flippant has a single function: flippant.flip(). Use it to flip things.
  • There are two modes: card (the default), and modal.
  • The back gets the default class of .flippant-modal-dark for modals and .flippant-modal-light for cards. These styles can be overridden or you can pass in your own additional class.
  • Most of the magic is in the css file. Override however you'd like

Example:

var front = document.getElementById('flipthis');
var back_content = "<h1>I'm the back!</h1>"; // Generate or pull any HTML you want for the back.
var back;

// to flip
back = flippant.flip(front, back_content) // flip(element_to_flip, content_for_back, type(modal/card), extra_class_for_back)

// to close (i.e. to flip back)
back.close()
1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago