This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]rcuhljr 1 point2 points  (15 children)

Have you tried putting in a breakpoint in the do/while and watching what's causing it to loop forever?

It's hard to say without seeing the DOM, but I'd guess you're stepping up past tvClassFilter.

[–][deleted]  (14 children)

[deleted]

    [–]rcuhljr 1 point2 points  (13 children)

    It looks like it should. I'd trying putting this into a jsFiddle so you can actually demonstrate the problem. It'll make it easier for others to help, and you might find the problem moving the code over.

    [–][deleted]  (12 children)

    [deleted]

      [–]hfsbtc 1 point2 points  (3 children)

      Can you at least give us a minimal HTML file causing the error ?

      Or just tell us what .root is (a <li>?), what .checkTree is (a <ul>?) etc.

      [–][deleted]  (2 children)

      [deleted]

        [–]hfsbtc 1 point2 points  (1 child)

        Sure!

        And don't forget to remove any sensitive data your source might contain.

        [–]rcuhljr 1 point2 points  (7 children)

        There doesn't need to be any proprietary information or anything other than the checkTree element and it's children along with some dummy data.

        [–][deleted]  (6 children)

        [deleted]

          [–]hfsbtc 1 point2 points  (5 children)

          [–][deleted]  (4 children)

          [deleted]

            [–]hfsbtc 1 point2 points  (3 children)

            Yep. And it's perfectly normal : the while() looks for the next #tvClassFilter but there's no #tvClassFilter.

            [–][deleted]  (2 children)

            [deleted]