Answer the question
In order to leave comments, you need to log in
How to get the result of a hook through ajax?
Tell me, how can I make it so that I can pull some getHook.php file through ajax and get the result of Hook::exec(<hook name>) in response?
I want to update the payment delivery methods available to him via ajax after the user is authorized in the basket (via ajax), etc. information.
Answer the question
In order to leave comments, you need to log in
The very first line you declare the variable "a". As I understand it, you want to use it in your condition. If so, then consider the following code:
$("#text-two").css("background",function(a){
if(a == 1){
return "red";
}else{
return "gray";
}
});
function(a){
if(a == 1){
return "red";
}else{
return "gray";
}
}
$("#text-two").css("background",function(){
if(a == 1){
return "red";
}else{
return "gray";
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question