scottbot95

Cowsep.com Open all boxes

Aug 2nd, 2015
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('.inventory-item').each(function() {
  2.     var $this = $(this);
  3.     var item_type = $(this).data('item-type');
  4.     if (item_type == 'chest') {
  5.         var item_id = $(this).data('item-id');
  6.         $.ajax({
  7.             url: "crates.php?crate=" + item_id,
  8.             type: "get",
  9.             dataType: 'json',
  10.             success: function(data) {
  11.                 if (data.status == "success") {
  12.                     console.log(data)
  13.                 }
  14.             }
  15.         })
  16.     }
  17. })
Advertisement
Add Comment
Please, Sign In to add comment