JSFiddle - React, Tailwind, and code Playground

by Xeon06

HTML

<div id="test">bnb</div>

JavaScript

var content = '<a href="http://example.com/index.php><b>Some text!</b></a> - <a href="http://example.com/index.php" class="ot-origin-anchor">News</a>';

$("#test").append($(content));
//Here is the problem. I don't know why but I can't define adres.
var adres = $("#test .ot-origin-anchor").attr("href");
console.log($("#test"));