Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- placeBetNew = function placeBetNew(match, tlss) {
- if (!$('#on').val()) {
- $("#placebut").show();
- console.log("You didn't select a team.");
- return;
- }
- if ($('.left').children().size() > 0) {
- if (returns == true) {
- $.ajax({
- type: "POST",
- url: "ajax/postBet.php",
- data: $("#betpoll").serialize() + "&match=" + match + "&tlss=" + tlss,
- success: function(data) {
- if (data) {
- $("#placebut").show();
- console.log(data);
- $("#placebut").click();
- } else {
- window.location.href = "mybets";
- }
- }
- });
- } else {
- $.ajax({
- type: "POST",
- url: "ajax/postBetOffer.php",
- data: $("#betpoll").serialize() + "&match=" + match + "&tlss=" + tlss,
- success: function(data) {
- if (data) {
- $("#placebut").show();
- console.log(data);
- $("#placebut").click();
- } else {
- window.location.href = "mybets";
- localStorage.playedbet = false;
- }
- }
- });
- }
- } else {
- $("#placebut").show();
- console.log("You didn't pick any items.");
- }
- }
- $("#placebut").click();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement