我試圖創建一個函數,如圖像中顯示,將在一個表中安排要點:安排陣列用JavaScript和jQuery元素
代碼我需要修改爲:
var rowsCount = 7;
var heightTable = 700;
var rowHeight = 100;
//an array with divs with elements, every element has a top and left position
var arrayOfDivs = [({topPosition : 99, leftPosition: 100}),({topPosition : 150, leftPosition: 400}),({topPosition : 578, leftPosition: 10})];
//so here create a function that will create arrays = rowCount, so here we will need 7 arrays and arrange elements from arrayOfDivs into new arrays
function arrangeInNewArrays (rowsCont,heightTable,rowHeight) {
var j=0;
for i=0 {
if (arrayOfDivs.topPosition[0] > rowHeight*j < rowHeight){
var array+j = array+j+arrayOfDivs[i];
}else {
i++,j++
}
}
print arrayofDivs[i];
}
有什麼建議嗎?我怎麼可以按行排列的點...
請幫我做///
CODE:http://jsfiddle.net/sYq9S/9/
從數組中排列點排列 –
http://jsfiddle.net/sYq9S/9/ –
在我回答之前有人對這個問題給予了獎勵:D這不會很快回答,我與幾個月前非常相似的東西 – pythonian29033