u.style.display = 'block';
Or if they click again, I collapse it again with a style change:
u.style.display = 'none';
This works great, except I would like an additional bit of functionality, and I don't know how to achieve it.
When a user expands a FAQ category, and then clicks one of the FAQ's, it takes them to the page with the answer. When they then click the browser Back Button to return to the FAQ list, the category that they had previously expanded is closed again. I want it to somehow remember which category was open, or the state of the stylesheet when they left the FAQ list page, and be able to return the user to the list in the same state that they left it in.
I don't want to open the FAQ answers in a new window.