通过css属性查找元素

use*_*173 5 jquery

我有一个div包含大约100个其他div元素.每个div元素都有topleft属性.如何找到div具有最大left属性的?
我需要最好的表现.谢谢.

Adi*_*dil 3

尝试这个,

现场演示

var divWithTopLeft = null;
var maxLeft = 0;
$('div').each(function(){
    left = this.style.left.replace('px','');
    if(left > maxLeft )
    {
         maxLeft = left;
         divWithTopLeft = this;
    }   
});
Run Code Online (Sandbox Code Playgroud)