nnattawat / flip

A lightweight jQuery plugin to make 3D card flipping animation
Other
624 stars 312 forks source link

How can this action played auto? #77

Closed MrKou47 closed 8 years ago

MrKou47 commented 8 years ago

i want the box slip itself autoinstands of onclick or hover,just auto like setInterval. what trigger should i set ?

JemarJones commented 8 years ago

I'm not quite clear on what this issue is about. Can you clarify/provide details?

ahgan84 commented 8 years ago

I think the user is trying to ask whether we can setInterval for it to flip by itself instead of using onclick and hover. Is there a way?

nnattawat commented 8 years ago

In that case you will need to set trigger: 'manual' then use JS to flip it manually

// With version v1.1.0

$(element).flip({
  trigger: 'manual'
});

setInterval(function() {
  var isFlipped = $(element).data('flip-model').isFlipped;
  $(element).flip(!isFlipped);
}, 3000);