Hello,
I do have a problem that I can’t solve by myself. I really hope someone here is willing to help me.
I have lots of visible **parent`<tr class=”parent”>
Under each parent there is a **child`<tr class=”child”>
I want a solution where the whole parent row acts as a button to either hide or show the child row.
Also while the child row is shown, a class should be added to the parent row.
The class should get removed after hiding the child row again.
It would be wonderful if showing/hiding had a smooth animation.
This is almost the only thing on the whole website that requires JavaScript.
So I’d prefer a solution in vanilla JS instead of including a framework like JQuery.
However I am not familiar with JavaScript at all.
I know I know… I really need to get into it. Recently I started learning Python and I really felled in love with programming. JavaScript is definitely the next thing on my ‘To Learn’ list. But for now I really just need a solution to this single specific problem… And none of the solutions I found online really helped me.
I’d be very very thankful if anyone here would take the time to provide me a solution to this.
Let me know if there is anything I could do to return the favour.
I’ve made a JSFiddle: