How can I select the last visible element in a div?

How can I select the last visible element in a div?

I have a page with various elements, some visible, some invisible, as they become visible depending on user input.

I am looking to select the visible elements, then within that collection, get the last element in the flow and manipulate it.
This is proving quite hard to do...