I'm trying to create a row of multiple divs using Javascript or jquery; say 32 tiny DIVs. Since the size is not fixed, I can simply use HTML. Table cells could also be an alternative, but since I need the click ID, and their color should change later, it is better to go for DIV.
I did it, but the divs are getting vertical instead of horizontal. What I want to do is exactly the notion of Sliding window in TCP. Look at the row of ack'ed packets on top of this simulation: http://histrory.visualland.net/tcp_swnd.html
I want for instance after a button click, the sliding window move to the right one step.
This is my project, simulating the above link for TCP: http://jsfiddle.net/j26Qc/47/
partial code for row of DIVs:
for(var i=1;i<=16;i++){
$('#table').append("<div id='"+i+"'>"+i+"</div>");
}
display:blockstyle so they will show underneath each other. to get them to show next to each other change their css display style to inline-block.