I'm trying to user jQuery to, for each element using the class button-0, add a new child element with the class button-0-text, and the text equal to the data-text attribute of the original button-0 element. I tried this...
HTML:
<div class="flex fs-0 button-0" data-text="Enhance"></div>
Javascript:
$(".button-0").append($("<div></div>").addClass("button-0-text").text($(this).parent().attr("data-text")));
...but it's not working. Is this even the proper way to do it? Any help would be really appreciated. Thank you ^.^