Dynamically Showing or Hiding Markup
You can use CSS to toggle markup visibility. However, <aura:if> is the preferred approach because it defers the creation and
rendering of the enclosed element tree until needed.
For an example using <aura:if>, see Best Practices for Conditional Markup.
This example uses $A.util.toggleClass(cmp, 'class') to toggle visibility of markup.
Add the c:toggleCss component to an app. To hide or show the text by toggling the CSS class, click the Toggle button.