I make a simple if and else structure. But it is not working.
I get the error. EN is nog defined.
How can i fix that?
Thanks,
var theLanguage = $('html').attr('lang');
// Diferent language
if ($(theLanguage) == "en") {
} else {
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
theLanguage variable is a string literal value .
$(theLanguage) is not a jquery object that’s why it throws error.
you can check as
That’s all.