Link to home
Start Free TrialLog in
Avatar of Neil Bradley
Neil BradleyFlag for New Zealand

asked on

Streamline if/else condition

I am looking to see if I can make this lengthy if/else condition a little more streamlined or efficient.

It works fine however Im sure it could be phrased to reduce code.

if ($("#outgoingPickup").is(':visible') || $("#outgoingDropoff").is(':visible') || $("#returnPickup").is(':visible') || $("#returnDropoff").is(':visible')) {
            $("#PnD_Wrapper").show();
        }else{
            $("#PnD_Wrapper").hide();
        }

Open in new window


ASKER CERTIFIED SOLUTION
Avatar of Noah
Noah
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial