[英]I have to read Coordinates of childs div in jquery and i want to sort out by x coordinates my code is below
The current way is providing invalid output. 当前的方法是提供无效的输出。
This is the object i'm trying to sort through 这是我要整理的对象
please check it 请检查一下
$('.childboxes').each(function () {
var divs = $(this);
var divID = $(this).attr('id');
var position = divs.position();
var left = position.left;
var top = position.top;
AllDivsCoor.push({ "id": divID, "leftcoor": left, "topcoor": top });
});
AllDivsCoor.sort('leftcoor');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.