wish help you to fix your issue I have a table with checkboxes that have a class of .toggle-extract and when clicked I'd like them to toggle the closest DIV with the class name .extract-years , You could change to
I hope this helps you . You can get to the "article_total" level (change that to a class, you should not have multiple identical IDs on one page) then from there you can target the p you need the below code assumes you changed the id to class
around this issue $(this) means the items that initiated the function, so in this case '$(".toggle-more-less")'. Closest will look for the closest parent to $(this) that fits the set criteria, so in this case it will traverses the dom upwards until it reaches a 'figure'.