Answer the question
In order to leave comments, you need to log in
How to get the values of multiple values?
Hello, I wrote this code
$('.column_sort').click(function (){
let column_name = $(this).attr('id');
let text = $(this).attr("alt");
let category = $(".category-tovar").data('cater');
$(".select-sort").text(text);
let order = $(this).data('order');
$.ajax({
url:"temp/category.php",
method:"POST",
data:{column_name:column_name,order:order,category:category},
success:function(data){
$(".blocktovar").html(data);
}
});
});
let category = $(".category-tovar").data('cater');
Answer the question
In order to leave comments, you need to log in
I solved the issue myself. I wrote the let category variable to take on the values of another variable that reads the IDs :) everything worked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question