code: function( elem ) {
  		if ( !elem || typeof elem === "string" ) {
  			return jQuery.inArray( this[0],
  				// If it receives a string, the selector is used
  				// If it receives nothing, the siblings are used
  				elem ? jQuery( elem ) : this.parent().children() );
  		}
  		// 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 );
  	}
docs: Determine the position of an element within the matched set of elements