Advertisement
Guest User

Untitled

a guest
Sep 13th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement