JSFiddle - React, Tailwind, and code Playground

by Jonathan Lam

HTML

<span data-colors="green blue yellow"></span>

JavaScript

var colors = $("span").data("colors").split(" ");

alert(colors);