I was using prototype js before moving to jQuery. This was my script:

        var children = $('div').getElementsByTagName('*');
        var childrenA = $A(children);
        var isChild = false;

        childrenA.each(function(child){
                if (child === obj) {
                        isChild = true;
                }
        });

I couldn't make jQuery substitute for it yet.
Otherwise I will probably use a standard function.

Thanks

On Apr 6, 12:50 pm, "Lwis" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> short version: how do I find out whether my element is a child of
> another element?
>
> long version: I think I want to loop through all elements and check
> each of them if it is the element I am searching for or not.
>
> I think I want something similar to YUI (http://www.un-instraw.org/
> wiki/training/skins/ycal/yui/docs/treeview/overview-summary-
> Node.js.html)
> isChildOf function.
>
> Any ideas would be appreciated.
> Thanks

Reply via email to