jQuery function to retrieve the size of an object.