Here is the code: http://jsfiddle.net/t2nite/KCY8g/
I created these hiding fields using jquery.
In each window there is a text and a button "SHOW" and "Hide" . I am trying to create a "SHOW / HIDE all" button.
But when I tried the code below, the whole button disappears.
$("#btn").toggle(function() { $(".para2, .para3, .para4").hide(200); $(".para2, .para3, .para4").show(200); });
This is the closest access to what I want.
$("#btn").click(function() { $(".para2, .para3, .para4").toggle(200); });
The code above works, but instead of hiding or showing all the fields, it simply switches them between hiding and showing. Reference.
I want the content to be hidden and the buttons are not in the para-classes.
source share