In this tutorial, we will discuss about how to toggle hide/show by clicking button. In the given below 2 example, there is button ,by clicking on it, the paragraph will hide/show . In first example , the paragraph will hide slowly and also display slowly. While in second paragraph, the paragraph hide/show is instantly, also effect depends on "flip++ % 2 = = 0" equation if it is true ,then it will hide paragraph and if it is false , then it will show paragraph.
jqToggleAppearance1.html
<!DOCTYPE html> |
OUTPUT

After clicking button :

jqToggleAppearance2.html
<!DOCTYPE html> |
OUTPUT

After clicking "Toggle" button :

After again clicking on "Toggle" button :

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.