2
I am making a dynamic menu with table (6 columns already defined and the row will vary) and bootstrap. would like to know what is the best structure to build a dynamic menu (the user will choose several options, will be able to clone the line, etc)
for(var i =0; i< arrSequencia.length;i++ ){
strInterface += "<tr class='formulario'>"+
"<td class='col-md-1'>"+
" <input type=\"button\" class=\"btn btn-danger btn-info-bloco sembloco\" value=\"Botao "+arrSequencia[i]+"\"/>"+
"</td>"+
"</tr>";
}
I am implementing so... ul-li is faster and light to render?
I would say the quickest way is to do it on the server... in HTML I don’t think there are relevant differences.
– Sergio
ideal is to make these menus dynamic on the server? I did everything in html.
– Denali
ul-li
would be more suitable for menus, already theTable
is most indicated and recommended only to show data.– MeuChapeu
as good practice, the ideal is with ul-li then?
– Denali
yes, the ideal and recommended.
Table
just to show data.– MeuChapeu
@Denali, a little piece of advice, instead of putting html in your hand, try using some template engine for this, I made a small example using Handlebars(http://handlebarsjs.com): http://jsfiddle.net/xrkuj8w3/. I believe this can simplify your work.
– Tobias Mesquita