I tried to search the Internet for the solution, but haven’t found anything helpful.
I’m building a TwitchTV app and want to make something like that: if the status is online (.online), I can click on it and a panel (.slide) with streaming info will slide down, then up if I click again.
To clarify: I have a few elements with the same class but want to target only the sibling of the one I click.
The problem is, slideToggle goes up and down a few times, and I don’t really know why. I can only guess it has something to do with the order of elements: for example, when the div with online class is the 8th from the end, slide panel moves exactly 8 times. When it’s the 5th from the end - it moves 5 times.
Can you help a bit? What causes this panel to slide up and down like crazy? Do you have some tips on how to make this work? Maybe there’s something wrong with my code?
My codepen: https://codepen.io/Strzesia/pen/PJVjbR/