Since that's more realistic, yes that would do nicely.
Two others completed the accordion in 3 lines task without jQuery.