Did you try .index()? See:
http://docs.jquery.com/Core#index.28_subject_.29
Untested, but you should be able to call something like:
var pos = $(div).parent().children(".sameClass").index(div);
- Richard
On 8/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hi All,
>
> I'm having much difficulty these last hours in coding a function that
> would give me a box(div) position in a column once the box is dropped
> ( actually I'm using sortable boxes demo on http://interface.eyecon.ro/
> ).
>
> I guess this should be done by traversing the DOM and couting the
> number of previous divs having a given Class ( the same class in
> fact ), and then I would have my box rank number in my column. I've
> tried to use the predefined functions for traversing the DOM but I'm
> not being able to use them in a proper way.
>
> Could someone help me on that issue.
>
> Thanks in advance...
>
> Joel
>
>