Nikunj Satasiya

Nikunj Satasiya

  • 280
  • 6.1k
  • 3.5m

How to Write Multiple If Condition in jQuery Template

Mar 25 2021 1:31 PM
Hi, Can anyone please help me to check multiple conditions within a single if condition in jQuery Template?
 
I have 2 different values that I have to compare at the same time.
 
Current Code:
  1.  {{if IsActive > 0}}  
  2.   // my if block code  
  3. {{else}}  
  4.  // my else block code  
  5. {{/if}}  
Expected Code:
  1.  {{if IsActive > 0 && isMobile = 1}}  
  2.   // my if block code  
  3. {{else}}  
  4.  // my else block code  
  5. {{/if}}  
 
I tried the above way but it gives an error. In about code, if isActive > 0 and isMobile = 1 is true Then the code block of If should be run else code block of else should be executed.
 
Please help me, and suggest the right way to archive this requirement. 

Answers (2)