Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 14th, 2012  |  syntax: JavaScript  |  size: 0.64 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $(document).ready(function () {
  2.     function flipBack() {
  3.         console.log($(this));
  4.         var $this = $(this);
  5.         $this.removeClass('flip');
  6.         $this.children('.front').delay(600).show(0);
  7.         $this.children('.back').delay(600).hide(0);
  8.         return false;
  9.     }
  10.  
  11.     function flipForward() {
  12.         var $this = $(this);
  13.         $this.addClass('flip');
  14.         $this.children('.front').delay(600).hide(0);
  15.         $this.children('.back').delay(600).show(0);
  16.         var t = setTimeout(function () {
  17.             $this.trigger("click");
  18.         }, 5000);
  19.     }
  20.     $('.click').toggle(flipForward, flipBack);
  21. });