Bug Tracker

Opened 14 years ago

Closed 12 years ago

Last modified 11 years ago

#4273 closed bug (invalid)

siblings() not working in IE

Reported by: ap Owned by: john
Priority: minor Milestone:
Component: core Version: 1.3.2
Keywords: siblings Cc:
Blocked by: Blocking:

Description (last modified by dmethvin)

this generates an error in IE:

element.siblings()[ ColumnIndex ];

I am currently using this workaround:

    * Works in IE.
    * keep this comment to reuse freely:
    * @see http://www.fullposter.com/?1
    function siblings(element)
        // use jquery for FF
        if ( element.siblings )
            return element.siblings();

        // do it manually
        if (typeof element == "string") { element = document.getElementById(element); };
        if (!element) { return null; };
        var siblings = [];
        var elementcopy = element;
        while (elementcopy.previousSibling)
            if (elementcopy.previousSibling.nodeType == 1)
            elementcopy = elementcopy.previousSibling;
        elementcopy = element;
        while (elementcopy.nextSibling)
            if (elementcopy.nextSibling.nodeType == 1)
            elementcopy = elementcopy.nextSibling;

        return siblings;

Change History (3)

comment:1 Changed 14 years ago by dmethvin

Owner: set to john

comment:2 Changed 13 years ago by dmethvin

Component: unfilledcore
Description: modified (diff)
Milestone: 1.3.2

Do you have a test case (HTML and script) that shows this problem occurring?

comment:3 Changed 12 years ago by dmethvin

Resolution: invalid
Status: newclosed

No response to test case request.

Note: See TracTickets for help on using tickets.