remove jquery dependency and modified the condition substitution to allow multiple lines