If you have jQuery code like this:
if (condition) {
$element.show();
} else {
$element.hide();
}
... you can shorten this to:
$element.toggle(condition);
Posted by Henning Koch to makandra dev (2015-10-13 10:05)
If you have jQuery code like this:
if (condition) {
$element.show();
} else {
$element.hide();
}
... you can shorten this to:
$element.toggle(condition);