我正在尝试创建一个函数来安排表中的点,如图所示:

我需要修改的代码是:
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 …Run Code Online (Sandbox Code Playgroud) 我在这里有一个代码:
<script>
$(function() {
$( "#photo" ).resizable();
$( "#photo" ).draggable({revert: 'invalid'});
$( "#left" ).droppable({
accept: '#photo',
drop: function( event, ui ) {
$( this )
.find( "p" )
.html( "Dropped!" );
}
});
});
</script>
Run Code Online (Sandbox Code Playgroud)
这个代码我必须在完全加载谷歌地图后运行,所以我需要为此代码"挂钩"tilesloaded事件.
http://jsbin.com/ayugun/7/edit
但是怎么做呢?