Currently, I have an application of an if statement that examines whether an element contains a style attribute. In the event that the style attribute is absent, it appends inline styling. Conversely, if the style attribute exists, it is removed. Furthermore, I am utilizing a transition in conjunction with the appended styling.
My objective is to execute //something following the conclusion of the transition utilizing transitionend. However, a persistent challenge I encounter is that each subsequent click on the element generates another transitionend event.
To better illustrate this issue, I have created a demonstration on JSFiddle.
I would greatly appreciate any assistance with this matter.