I have a Themeable Button on a website. The value of that button is established by a PHP variable:
Button value = "Log In" or Button Value = "Log Out".
Works fine.
So now the action to that button is dependant upon the value of $myLogValue I need to include this javascript to the
Themeable Button:
Code: Select all
var btnValue = $('myLogValue').val();
if (btnValue == 'Log In') {
// Action for first value
login.php;
} else {
// Action for second value
logout.php;
}
