SHARE
TWEET

Untitled

a guest Sep 13th, 2017 34 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(".card").hover(function (event) {
  2.     console.log(event)
  3.     if (Math.round(event.timeStamp) >= 4000) {
  4.       let team_id = parseInt($(this).find("span:first-child").html());
  5.       var carta = this;
  6.       $.ajax({
  7.         method: "POST",
  8.         url: "/team/" + team_id,
  9.         dataType: "JSON",
  10.         timeout: 1000,
  11.         error: function (error) {
  12.           console.log(error);
  13.         },
  14.         success: function (res) {
  15.           $(carta).append(plantilla_teams(res.id, res.plays_lose, res.plays_win))
  16.         }
  17.  
  18.       })
  19.     }
  20.  
  21.  
  22.   }, function () {
  23.     if ($(this).has("div.card-detalle")) {
  24.       $(this).find("div.card-detalle").remove();
  25.     }
  26.   })
  27. }
RAW Paste Data
Pastebin PRO Autumn Special!
Get 40% OFF on Pastebin PRO accounts!
Top