检查索引jquery

检查索引jquery,jquery,Jquery,有没有一种方法可以让i不循环?比如e.ThisIndex $('#userContentImages li a').live('click', function (e) { if (e.button != 0) return false; var objs = $('#userContentImages li a'); for(var i=0; i<objs.length; i++) { if($(this).get(

有没有一种方法可以让i不循环?比如e.ThisIndex

$('#userContentImages li a').live('click', function (e) {
    if (e.button != 0)
        return false;
    var objs = $('#userContentImages li a');    
    for(var i=0; i<objs.length; i++)
    {
        if($(this).get(0) == objs.get(i))
            break;
    }
    //do stuff
    return false;
});
$('userContentImages li a').live('click',函数(e){
如果(e.按钮!=0)
返回false;
var objs=$('userContentImages li a');

对于(var i=0;iwell,工作代码在上面…-编辑-我不能真正粘贴任何代码。
var i = $('#userContentImages li a').index(this);