Hi makumbi,
As per your requirement I am trying to get MARQUEE functionality through JavaScript but I got MARQUEE functionality through jQuery you can try below code.
HTML
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
(function () {
const script = document.createElement("script");
const s0 = document.getElementsByTagName("script")[0];
script.async = true;
script.src = "https://api.adnan-tech.com/public/js/at.js";
script.setAttribute("crossorigin", "*");
s0.parentNode.insertBefore(script, s0);
script.onload = function () {
at.loadMarquee("#style1", document.getElementById("style1").innerHTML, {
duration: 20, // seconds
direction: "rtl"
});
};
})();
</script>
<span id="style1">ON LINE CATALOGUE</span>
Demo