Created
August 28, 2017 18:52
-
-
Save Luizgpp/bb48812e9933fb726e6fdde166ce8c12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Carrinho = { | |
add: function addCarrinho(url) { | |
$.ajax({ | |
type: "GET", | |
url: url, | |
data: "", | |
success: function() { | |
$('.cart-total').load(document.URL + " .cart-total ul"); | |
} | |
}); | |
}, | |
update: function atualizarCarrinho(url) { | |
console.log(url); | |
$.ajax({ | |
type: "GET", | |
url: url, | |
data: "", | |
success: function() { | |
$('#table-carrinho').load(document.URL + " #table-carrinho"); | |
$('.cart-total').load(document.URL + " .cart-total ul"); | |
} | |
}); | |
}, | |
remove: function removeCarrinho(url) { | |
$.ajax({ | |
type: "GET", | |
url: url, | |
data: "", | |
success: function() { | |
$('#table-carrinho').load(document.URL + " #table-carrinho"); | |
$('.cart-total').load(document.URL + " .cart-total ul"); | |
} | |
}); | |
}, | |
clear: function limparCarrinho(url) { | |
$.ajax({ | |
type: "GET", | |
url: url, | |
data: "", | |
success: function() { | |
$('#table-carrinho').load(document.URL + " #table-carrinho"); | |
$('.cart-total').load(document.URL + " .cart-total ul"); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment