Hey there, I'm working on implementing a "View More" button on my page. The button will reveal another unordered list that currently has the class of "hidden-list".
When the user clicks on "View More", I want it to slideToggle the hidden-list element.
I've been experimenting with using the closest method in jQuery, but so far I haven't had much success.
Here's what my current jQuery code looks like:
$('li.list-group-item a.view-more').click(function()
{
$(this).closest('.list-group-item').find('ul.hidden-list').slideToggle();
})
Feel free to take a look at my JSFiddle for the HTML markup and more details.
Thanks!