Consider a table of locations where one column is a mailing address. Each address is at least 2 lines, a few addresses are 6 lines and everything else falls in between. I have a request to display the table with only one address line with the option to expand/collapse the address cell to show the full address.
I can imagine a number of solutions to this. (1) only output the first line and use Ajax to pull the full address on demand. (2) only output the first line, but store an array of all addresses client side and use that to toggle 1 line/full address display. (3) output the full address in the table, but use CSS to initially set display to one line, and jQuery to toggle between 1 line/full address display. I like this solution because it won't involve any changes in the backend code (solution 1 and 2 will). (4) another solution? I know how to do 1 and 2, but am curious about 3, and welcome other suggestions. Admittedly this is more of a CSS question than pure jQuery, but I'm curious if someone may have done this or if a plugin might exist?