Open PriyankaRose opened 7 years ago
Add this function on the JTinder js file:
undo: function () { if(current_pane !== panes.length - 1) { ++current_pane; panes.eq(current_pane).animate({"transform": "translate(0px,0px) rotate(0deg)"}, $that.settings.animationRevertSpeed); panes.eq(current_pane).find($that.settings.likeSelector).css('opacity', 0); panes.eq(current_pane).find($that.settings.dislikeSelector).css('opacity', 0); panes.eq(current_pane).show(); } },
To call it from your file simply do $('#tinderslide').jTinder('undo');
Does this still work yanmendes by any chance?
Yes, it does
Hi! how can I implement this undo function on an onclick event of a button?
$(document).on("click", "#undo", function (e){ $('#tinderslide').jTinder('undo'); });
Hello,
I need a way to undo the swipe (left/right). Is there a way for it?