JSFiddle - React, Tailwind, and code Playground

HTML

<div class='marquee-wrapper'>
    <div class='marquee-content'>
       Marquee functionality working fine. :)
    </div>
</div>

CSS

div.marquee-wrapper {
    white-space:no-wrap;
    overflow:hidden;
}
div.marquee-wrapper > div.marquee-content {
    white-space:nowrap;
    display:inline;
    width:auto;
}

JavaScript

var valmarquee = $('div.marquee-wrapper');
console.log(valmarquee);
valmarquee.each(function() {
    var marq = $(this),indent = marq.width();
    marq.valmarquee = function() {
        indent--;
        marq.css('text-indent',indent);
        if (indent < -1 * marq.children('div.marquee-content').width()) {
            indent = marq.width();
        }
    };
    marq.data('interval',setInterval(marq.valmarquee,16));
});