Work Journal 2013-jan-15

Today there was not very much to write about, but fixed the problems I introduced yesterday and did fix a number of minor issues. I created my first html table today - dynamically - used for layout… Well, quite ugly and it doesn’t make me proud, but it did do the job:

var innerHtml = ''; 
innerHtml = innerHtml + "<table>"; 
var elementNr = 0; 
$.each(technologies, function () { if (elementNr % 2 === 0) { innerHtml = innerHtml + "<tr>"; } innerHtml = innerHtml + "<td>"; var checkboxHtml = '<label><input name="' + this[1] + '" type="checkbox" value="' + this[0] + '" checked>' + this[1] + '</label><br/>'; innerHtml = innerHtml + checkboxHtml; 
innerHtml = innerHtml + "</td>"; 
if (elementNr % 2 === 1) { innerHtml = innerHtml + "</tr>"; } elementNr = elementNr + 1; }); innerHtml = innerHtml + "</table>";
$('.teknologi-scroll-checkboxes p').html(innerHtml);

Work Journal – a diary on what I did work/programming related today.