-1
How to define an "IF" run according to text of a "var"? Ex:
var Ativar = {
ativo: 'sim'
};
I intend to use the "yes" for "IF" to validate and execute. Does anyone know how to?
Pardon my explanation. I hope you understand my claim. Thank you.
-1
How to define an "IF" run according to text of a "var"? Ex:
var Ativar = {
ativo: 'sim'
};
I intend to use the "yes" for "IF" to validate and execute. Does anyone know how to?
Pardon my explanation. I hope you understand my claim. Thank you.
0
I don’t know if that’s what you meant, but try it this way:
if(ativar.ativo == 'sim'){
//função
}
Don’t forget to always declare variables with the first lowercase letter ("var activate = {}")
Browser other questions tagged jquery if
You are not signed in. Login or sign up in order to post.
Exactly that, rust fell from my eyes when I saw the capital A there. Thank you very much.
– Lucas Vilas Boas
No problem. Managed to achieve the result you needed?
– ketts
Sorry for the delay in answering. Due to the Stack policy, I could not answer before. Yes the problem was fixed. It was just the error in var. Thank you.
– Lucas Vilas Boas
All right, I’m glad.
– ketts