Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Trouble selecting individual div when using slideToggle in jQuery

I'm trying to use a slide toggle to be able to show and hide text when clicking a button I've created however, when I click the + button, it shows all the elements with the considerText classname, and i need to be able to open them individually. I was led tot think I need to set something up using the sibling or children method but havent been able to get it to work. any help is appreciated. thank you.

see below for my html and existing script

<div class='considerationGroup'> <div class='considerTitle'>Advantages<button class='plus'>+</button></div> <div class='considerBottomBorder'></div> <div class='considerText'>Example Copy lorem ipsum</div> </div>

$(document).ready(function () { $('.plus').click(function () { $('.considerText').slideToggle(); }); });*/