• Stars
    star
    214
  • Rank 177,917 (Top 4 %)
  • Language
    JavaScript
  • Created over 10 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Create a card layout that let your user flip through it like you see on Google Tips

#Tip Cards by Pete R. Create an animated card layout that let your viewer flip through it like you see on Google Tips Page.

Created by Pete R., Founder of BucketListly

Demo

View demo

Compatibility

Modern browsers such as Chrome, Firefox, and Safari on desktop have been tested. I have not tested this on IE.

Basic Usage

Tip Cards plugin let you create a layout of cards with a card-like interaction that you see on Google Tips Page. I've also added several new animation options so that you can personalize it to your own liking.

To add this to your website, all you have to do is include the latest jQuery library together with jquery.tip_cards.js and tip_cards.css into your document's <head>, and follow the HTML markup as shown below:

2 Sides Flippable HTML Markup

This is the default markup if you are looking to replicate the effect you see on Google Tips Page.

<body>
  ..
  <ul class="tips">
    <li>
      <div class="tc_front">
      	<a href="#tip1">...</a>
      </div>
      <div class="tc_back">...</div>
      <div id="tip1" class="tip">
        <div class="tc_front">...</div>
        <div class="tc_back">...</div>
      </div>
    </li>
  ..
</body>

Note: If you would like the card to be flippable, the html markup above will work perfectly. The content inside tc_front will be the front side of the card and the content inside tc_back will be the back side of the card.

Normal HTML Markup

If you DO NOT want it to be flippable then take out all the tc_front and tc_back as shown below and your card will no longer be flippable.

<body>
  ..
  <ul class="tips">
    <li>
      <a href="#tip1">...</a>
      <div id="tip1" class="tip">
        ...
      </div>
    </li>
  ..
</body>

Once that is done, simply call the function like below and the plugin will automatically detect whether to make the card flippable or not from the markup you provided:

  $(".tips").tip_cards({
    entrance: "bottom", // This option let you determine the direction of the fly in entrance animation when all the cards appears. Available options are "bottom", "left", "right", and "top". The default value is "bottom".
    column: 4, // The plugin also let you define how the card will be displayed and aligned. You can set the column of cards here. The default value is 4. 
    margin: "1%", // You can define the margins between each cards here. Percentage is currently support at this point. The default is "1%".
    selector: "> li", // You can define a custom selector if you do not want to use ul and li tags. This option accepts the normal CSS selector. The default value is "> li" 
    hoverTilt: "right", // Define the tilt direction when cards are hovered here. Available options are "right", "left", "up", and "down". The default value is "right".
    triggerSelector: "> li a", // You can also define a custom selector for the trigger button here. The default value is "> li a" which will use the link inside a list as a trigger to activate the card. 
    cardFlyDirection: "all", // You can define the card fly animation when the modal appears here. Available options are "all", "top", "bottom", "left", and "right". The default value is "all" which will have the cards fly in from all direction and stack up under the opened modal
    closeButton: "X", // You can define the content of the close button here. Change this to false to prevent the plugin from automatically generating the close button. The default string is "X".
    flipButton: "Flip", // You can define the content of the flip button here. Change this to false to prevent the plugin from automatically generating the flip button. The default string is "Flip".
    navigation: true, // Set this to true to allow users to navigate from one card to another when modal is opened. Change it to false to disable it. The default value is true.
    beforeOpen: null, // A callback function that will be executed before the modal opens.
    afterOpen: null // A callback function that will be executed after the modal opens.
  });

Callbacks

You can use callbacks to perform actions before or after the modal opens.

beforeOpen()

This callback will be called called before the modal opens after cards are clicked.

$(".tips").tip_cards({
  beforeOpen: function () {
    ...
  }
});

afterOpen()

This callback will be called called after the modal opens.

$(".tips").tip_cards({
  afterOpen: function () {
    ...
  }
});

Now, what you will have on your website is a gallery of cards that will let users interact in a way that is familiar and rich in experience like you see on Google Tips Page. Thank you for dropping by and if you want to see more of my plugins, visit The Pete Design, or follow me on Twitter and Github.

Other Resources

  • Tutorial (Coming Soon)

More Repositories

1

onepage-scroll

Create an Apple-like one page scroller website (iPhone 5S website) with One Page Scroll plugin
JavaScript
9,545
star
2

purejs-onepage-scroll

The javascript version of the infamous jQuery One Page Scroll without relying on jQuery.
JavaScript
768
star
3

simple-text-rotator

Add a super simple rotating text to your website with little to no markup
HTML
750
star
4

loading-bar

Add a Youtube-like loading bar to all your ajax links
HTML
662
star
5

label_better

Label your form input like a boss with beautiful animation and without taking up space
JavaScript
517
star
6

flat-shadow

A small jQuery plugin that will automatically cast a shadow creating depth for your flat UI elements
HTML
483
star
7

panorama_viewer

Embed panorama photos on your website with Panorama Viewer
JavaScript
472
star
8

wheel-menu

Add a fully customisable Path-like wheel menu button to your website
HTML
403
star
9

interactive_3d

Create a 3D interactive object using images and one simple JS call
JavaScript
378
star
10

notify-better

An all in one jQuery plugin that let you change your favicon, browser's title and more to reflect new notifications
JavaScript
375
star
11

tiltedpage_scroll

Create a beautiful 3D tilted effect on scroll with jQuery Tilted Page Scroll plugin
JavaScript
323
star
12

autofix_anything

Fix position of anything on your website automatically with one js call
JavaScript
313
star
13

interactive_bg

Create an interactive moving background/object that reacts to viewer's cursor
JavaScript
232
star
14

shuffle-images

The Simplest Way to shuffle through images in a Creative Way
JavaScript
212
star
15

zepto-onepage-scroll

Zepto One Page Scroll is the javascript version of the infamous jQuery One Page Scroll.
JavaScript
186
star
16

adaptive-modal

Create modal windows that can be morphed from anything
JavaScript
168
star
17

fancy-scroll

Add Overflow Scroll Effect like on iOS/Android but for your website
HTML
157
star
18

immersive-slider

Create an immersive slider that changes the whole container to match the viewing slide
JavaScript
139
star
19

square_menu

Create a Square-like Menu Animation for Website using jQuery and CSS3
CSS
125
star
20

fly_sidemenu

Recreate an Airbnb iOS7 App Menu Animation using CSS3 and jQuery
CSS
113
star
21

flipout_cards

Create a Dynamic Multi Level Flip Out Cards
CSS
111
star
22

jumpto

A plugin that let you create a smooth jump to sub navigational menu in one JS call
JavaScript
106
star
23

fullpage-menu

Create a Full Page, Fully CSS3 Animated Menu for your Navigation with Full Page Menu
CSS
106
star
24

zoom-scroller

Create a Subtle Zoom Animation on Images while Scrolling
JavaScript
99
star
25

let_it_snow

Create and Control a Festive Snow on Your Website using HTML5 Canvas
JavaScript
93
star
26

endpage-box

A plugin that let you add an end page box that will display when scrolled to the bottom.
HTML
86
star
27

flipping_gallery

Create a simple but beautiful 3D flipping gallery with on JS call
JavaScript
79
star
28

subscribe-better

Create a better, highly customizable subscription modal or newsletter signup window with jQuery Subscribe Better
CSS
74
star
29

planetarium

Construct an Interactive Planet and Build the Universe on your website
JavaScript
58
star
30

flipping_text

Create a ticking text intro animation for your typography.
JavaScript
55
star
31

fullpagenav

Create a fully responsive and dynamic full page navigation with one JS call
JavaScript
35
star
32

parallax-scroller

Scroll through lists with a smooth parallax effect
JavaScript
27
star
33

flatline_icon_free

180+ high quality & minimal icons webfont for Bootstrap Framework
26
star
34

endpage_next

Navigate without moving your mouse. Pull to refresh/Hold to go next functionality on the web,
JavaScript
12
star