4 ms·
Yep, that's why I always demand that if you're not going to use curlies, you make it a one-liner. // okay if (!isActive) $parent.toggleClass('open');
by jayferd 14y ago
Yep, that's why I always demand that if you're not going to use curlies, you make it a one-liner.
// okay
if (!isActive) $parent.toggleClass('open');
// not okay
if (!isActive)
$parent.toggleClass('open');
That way you know when you change it to two lines, you have to add curlies.