jQuery overall element index


Is there a way to use jQuery index() method to find the index of an element related to the overall document?

I mean, if I have a bunch of img tags in a document, is there a way to know, regardless of their position in the document, their index?

example :

<img />
   <img />
      <img />

I've tried using $(window), $(body), $(document), but they all fail. I really need the overall index of the element.



index() returns the position in a given collection:


Do you mean






Need Your Help

sorting vector with 3D points by a coordinate value -- syntax


I want to sort points_vec vector as shown in the pseudocode below. I want to sort this vector, by a coordinate value like x or y or z

In CXF, is there a way to program the configuration of a client programmatically?

java spring web-services cxf

I have a project that contains web services and also a web service client. I want to configure the web service client without effecting the web services. How can I do this?