in jQuery how do I activate a method automatically rather than selecting an element when an if..else statement is ran? For example:
if(data.session_state == false) {
RatherThanSelectingAutoRunProccess.fancybox();
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.
Here’s an idea: side effects!
Note that
session_stateis now a function.Also note that I would immediately fire a developer who wrote this in my project 🙂