css - Should I use DIV or TABLE? -
i need build simple table of data. let's use tables, that's for.
however there , little trick here if click "show" there ajax call show data below. makes me wonder, should switch divs?
i know both possible - i'm trying see cleaner , easier...
(data here fake)
you answer own question - data tabular, horizontal , vertical relationships, semantically correct markup table. intended user interface should never factor in semantics choices.
you can easily, , correctly, implement show button inserting new tr element underneath clicked 1 correct data.
considering original markup follows:
<tr> <td>1</td> <td>orlando</td> <td>gee</td> <td>phone number</td> <td><button>show</button></td> </tr> you can then, in js, append required new rows, 1 per attribute:
<tr class="otherbg-and-bold"> <td></td> <td colspan="2">email address</td> <td colspan="2">sample@company.tld</td> </tr>
Comments
Post a Comment