After running the code snippet, you may notice that the output appears to be a bit glitchy.
I've been grappling with this issue for the past 48 hours and have yet to find a resolution that works effectively.
I've attempted various solutions from the community here on Stack Overflow, but none of them seem to hit the mark. The scenario involves a Parent, Child1....n, and Grandchild1....n relationship. When clicking on the parent, all children should expand, and each child click should reveal their respective grandchildren.
While my code somewhat achieves this functionality, it lacks visual appeal.
PS: I'm not a professional web developer, and this task was assigned to me by my boss, making this whole experience completely new territory for me.
Thank you all in advance, and I sincerely hope this question doesn't cause any inconvenience to anyone.