Thanks for the feedback. i have tried changing this to btn and still doesn't work. What I mean is that I have 3 div elements and those elements have a <button class='play'> each. And whenever a button is clicked it should indicate on the parent element which is the div that the button is playing a audio. And when i click on the second button from div number two, the data-status='isPlaying' should be on the second div and not the first one anymore
Thanks for the feedback. i have tried changing
thistobtnand still doesn't work. What I mean is that I have 3divelements and those elements have a<button class='play'>each. And whenever a button is clicked it should indicate on the parent element which is thedivthat the button is playing a audio. And when i click on the secondbuttonfromdivnumber two, thedata-status='isPlaying'should be on the seconddivand not the first one anymoreAlrighty, this is my markup,
And this is my script
Thank you so much...instead of using
button.parentNode.playStatusi used it as a dataset so I can retrieve it later on...Thanks