Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function release() {
- // OUT OF CARD BEHAVIOR
- if (index === 1) {
- document.querySelector('.user_card').innerHTML = "Plus de profil disponible"
- }
- if (pullDeltaX >= decisionVal) {
- const id = $card.attr("id")
- fetch(`http://localhost:8888/Adopteunstage-main/public/interns/likeEnterprise&enterprise_id=${id}&intern_id=${<?= $_SESSION['user_id']?>}`)
- $card.addClass("to-right");
- } else if (pullDeltaX <= -decisionVal) {
- const id = $card.attr("id")
- $card.addClass("to-left");
- }
- if (Math.abs(pullDeltaX) >= decisionVal) {
- $card.addClass("inactive");
- setTimeout(function() {
- index--
- $card.addClass("hidden");
- }, 300);
- }
- if (Math.abs(pullDeltaX) < decisionVal) {
- $card.addClass("reset");
- }
- setTimeout(function() {
- $card.attr("style", "").removeClass("reset")
- .find(".demo__card__choice").attr("style", "");
- pullDeltaX = 0;
- animating = false;
- }, 300);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement