JSAPI.info

jQuery.fn.index »

See documentation for jQuery.fn.index »
jQuery (1.8.3) - see full source
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
index: function( elem ) {
 
    // No argument, return index in parent
    if ( !elem ) {
        return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
    }
 
    // index in selector
    if ( typeof elem === "string" ) {
        return jQuery.inArray( this[0], jQuery( elem ) );
    }
 
    // Locate the position of the desired element
    return jQuery.inArray(
        // If it receives a jQuery object, the first element is used
        elem.jquery ? elem[0] : elem, this );
},