Created
May 7, 2014 02:32
-
-
Save onesup/902acf02d19bda4b4477 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
$("#coupon_confirm").click(function(e){ | |
e.preventDefault(); | |
var url = "/" + $("#coupon_confirm").attr("data-code"); | |
$.ajax({ | |
type: 'get', | |
url: '/coupon_finish.json', | |
success: function (data) { | |
if(data.result == "finish"){ | |
alert("아쉽네요!\n다음엔 조금더 서둘러주세요~"); | |
}else{ | |
confirm("쿠폰을 사용하시겠습니까?"); | |
$("#coupon_form").submit(); | |
} | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment