JSFiddle - React, Tailwind, and code Playground

by musicreader

HTML

<div id="fileFolderViewLocation"></div>

JavaScript

var obj = $("#fileFolderViewLocation")[0];

                    // Create the anchor element
                    var anchor = document.createElement("a");
                    anchor.href = "javascript:void(0)";
                    anchor.textContent = "test";
                    anchor.addEventListener("click", alert.bind(this,"test"));
                    // Append the anchor
                    obj.appendChild(anchor);
                    // Add the arrow separator
                    obj.appendChild(document.createTextNode(" → "));