JSFiddle - React, Tailwind, and code Playground

by _sir

HTML

<div class="container">
    <div class="marquee">This is a marquee</div>
</div>

CSS

.container { min-height: 20px; }
.marquee { border: 1px solid blue; min-height: 1.4em; }

JavaScript

/*
 * Jarquee jQuery Plug-in
 * Simple Marquee using .animate()
 *
 * Copyright (c) 2011-2012 Samuel Rouse
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 * Requires jQuery 1.4+, tested with 1.4.2
 *
 * Date: 2010-05-13
 * Revision: 1
 * Options: 
 *	- speed ( rough characters per second )
 *	- baseWidth ( integer width to briefly set the inner to make sure the content is on one line )
 *	- pause ( true offers pause on mouseenter, resume on mouseleave )
 *	- center ( true centers content if narrower than marquee container )
 *
 * Date: 2011-06-23 - 2011-06-28
 * Revision: 3 (Added JSON fetch)
 * New Options:
 *  - URL ( URL for fetching contents via AJAX )
 *  - ##  ( replace ## in URL with REL from object for fetch )
 *
 * Date: 2011-12-28
 * Revision: 4 (Added Load Content Callback for Cufon, etc)
 * New Options:
 *  - onLoad ( function that will be called when content is loaded )
 *
 * Date: 2012-04-17
 * Revision: 5 (Added init delay and left offset)
 *  - delay (amount of time to wait before the banner starts moving, defaults to 500ms)
 *  - offset (number of pixels from the left to start the text; defaults to 50)
 *
 * Date: 2013-10-11
 * Revision: 6 (Updated for JQuery 1.10+ by Sam T)
 *  - replaced deprecated calls to .bind() with calls to .on() for compatibility with JQuery 1.10 and above.
 *
 * Date: 2014-03-11
 * Revision: 7 (Updated for JSHint and general cleanup)
 *  - better formatted for Google Closure Compiler
 * 
 */
 /*global jQuery*/ 
(function ($) {
	"use strict";
    $.fn.jarquee = function (options) {

		var self = $.fn.jarquee;
	
        // Set the options.
        options = $.extend({}, self.defaults, options);
        self.options = options;
        self.object = this;

        if (options.URL !== '') {
            

            // If there is "##" in the URL, replace it with the Rel
            var myURL = options.URL;

            if (myURL.indexOf("##") > -1) {
                myURL =...