Wednesday, 15 May 2013

javascript - Show Hide All divs with same class at once Java Script -


I'm not sure why, but it works for me maybe I uploaded something wrong

JS code

  $ ("# toggle-content"). Click (function () {$ (".other containers") SlideToggle (500);}); $ ("# CloseImgPP") Click (function () {$ (this) .Parent (.) Hide (500);}); Click $ ("# CloseImgPP2") (function () {$ (this) .Parent (.hide (500);}); Click $ ("# CloseImgPP3") (function () {$ (this) .Parent (Hide) (500);}); I have 5 equal devices, I close every one and for example I just close 3 with 5 divas and when I use the Show / Hide button it hides and shows the currently open devices. 

The question is how can I make it show / hide button by clicking it will display everything and then hide everything, or show it Like 2 different buttons to hide and

I think you want something that will change your design a bit if you hide them Click the

  $ ("# hide-content") (function () {$ (". Other containers"). Hiding (500 );}); $ ("#Show-content") Click (function () {$ (". Other containers"). Show (500);}); $ ("# CloseImgPP") Click (function () {$ (this) .Parent (.) Hide (500);});   

Edit: And maybe the closeImgPP should be a square, if you want to turn it off in each 'bubblain'

No comments:

Post a Comment