26 lines
787 B
JavaScript
Executable File
26 lines
787 B
JavaScript
Executable File
$(".razmer_foto").click(function(event) {
|
|
var foto_id = $(this).data("fotoid");
|
|
var foto_razmer = $(this).data("razmer");
|
|
alert(foto_id);
|
|
//return false;
|
|
var status = $(this).prop("checked");
|
|
if (status == true) {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/act/foto_cart",
|
|
data: "act=update&foto_id=" + foto_id + "&foto_razmer=" + foto_razmer,
|
|
success: function(data) {
|
|
alert(data);
|
|
}
|
|
})
|
|
} else {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/act/foto_cart",
|
|
data: "act=del&foto_id=" + foto_id + "&foto_razmer=" + foto_razmer,
|
|
success: function(data) {
|
|
alert(data);
|
|
}
|
|
})
|
|
}
|
|
}) |