JQuery Show Hide showing multiple content?

By adding class attributes to the item you want to trigger the show/hide and the element you want shown / hidden you can do something like this.

By adding class attributes to the item you want to trigger the show/hide and the element you want shown / hidden you can do something like this: HTML: Title 1 Another one?! YES! JS: $(document).

Ready(function(){ $('. Showhidecontainer').hide(); $('. Showhideclick').

Click(function() { $(this). Next('. Showhidecontainer').

SlideToggle('fast'); }); }); This also gives you the flexibility to use different elements to contain your hidden content and which element triggers the action. Hope this helps.

Work great thank you! – Alkemee Sep 2 at 20:51 Thank you for all of the help running into this issue though seen here jsfiddle. Net/TB6vP/7 when you click on the word "Animation" the tries to come out but doesn't...any thoughts?

– Alkemee Sep 2 at 21:57 Im assuming it's because I can't put another showhidecontainer inside of another? I know I have done this with javascript before – Alkemee Sep 2 at 22:16 You need to place the How isn't that cool?! Inside a or for it to work.

Also please accept this answer if it helped you. – dSquared Sep 2 at 22:35.

I hope this is what you are looking for. Working demo $(function(){ $('div. Showhide > div').hide(); $('div.

Showhide > h3'). Click(function() { $(this).next(). SlideToggle('fast'); }); }).

The demo is working perfectly. Thank you for the time put in to this, any idea on how to add a background color (box) to the content? – Alkemee Sep 2 at 20:49 By content you mean the div which is sliding?

– ShankarSangoli Sep 2 at 20:56 You can set the background color use css method $("selector"). Css("backgroundColor", "specifyColorHere") – ShankarSangoli Sep 2 at 21:09 Thank you for all of the help running into this issue though seen here jsfiddle. Net/TB6vP/7 when you click on the word "Animation" the tries to come out but doesn't...any thoughts?

– Alkemee Sep 2 at 21:59 You were missing the enclosing ol tag for li. I fixed it take a look at this fiddle jsfiddle. Net/TB6vP/8 – ShankarSangoli Sep 2 at 22:13.

$(document). Ready(function(){ $('div. Showhide > div').hide(); $('div.

Showhide > h3'). Click(function() { $(this).next(). SlideToggle('fast'); }); }).

Here's an example of it working... jsfiddle. Net/9py7S – DMac the Destroyer Sep 2 at 19:31.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions