TOGGLING VALUES

Toggling visibilty and values

Click on the button above to toggle visibilty of this paragraph.
Implementation relies on the toggle() jQuery function, which switches visibilty on/off, being a shortcut for the if...else condition of the pair show()/hide() functions.
To change the value of the button's text, we use the val() function.

Sources

HOME