Welcome Guest, Not a member yet? Register   Sign In
Switch var from TRUE to FALSE (jQuery)
#1

[eluser]Fielder[/eluser]
If I have a jquery variable as such, how can I easily flip it.
Code:
var print = true;
I want to change the value of var print to false, without having to do if/else statement.
Code:
if (print == true)
{
    print = false;
}
else
{
    print = true;
}
Or what would be the shorthand if/else statement for it? Just looking for cleaner code for such a simple function.


Messages In This Thread
Switch var from TRUE to FALSE (jQuery) - by El Forum - 04-04-2010, 09:52 PM
Switch var from TRUE to FALSE (jQuery) - by El Forum - 04-04-2010, 10:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB