JSFiddle - React, Tailwind, and code Playground

by kachibito

HTML

<h1 id="events">EVENTS</h1>
        <h2>Normal Events</h2>
        <section class="box touch">touch</section>
        <section class="box tap">tap</section>

        <h2>Special Events</h2>
        <section class="box doubletap">doubletap</section>
        <section class="box hold">hold</section>
        <section class="box fingers">fingers</section>

        <h2>Swipe Events</h2>
        <section class="box swipe">swipe</section>
        <section class="box swiping">swiping</section>
        <section class="box swipeLeft">swipeLeft</section>
        <section class="box swipeUp">swipeUp</section>
        <section class="box swipeRight">swipeRight</section>
        <section class="box swipeDown">swipeDown</section>

CSS

body {
            font-family: 'Courier New';
            font-size: 12px;
        }
        h1, h2 {
            display: block;
            margin: 0px;
            padding-left: 4px !important;
        }

        h1 {
            font-size: 24px;
            line-height: 32px;
            background-color: rgba(0,0,0,0.5);
            color: #fff;
            margin-top: 16px;
        }

        h2 {
            font-size: 16px;
            line-height: 20px;
        }

        .success {
            color: green;
            border: solid 1px green;
            background: rgba(0,255,0,0.25);
        }

        section.box {
            height: 80px;
            width: 80px;
            background: #ccc;
            margin-right: 4px;
            margin-bottom: 4px;
            display: inline-block;
        }

        section.test {
            color: red;
            border: solid 1px red;
            height: 20px;
            line-height: 20px;
            background: rgba(255,0,0,0.25);
        }
            .test.success {
                color: green;
                border: solid 1px rgba(0,255,0,0.75);
                background: rgba(0,255,0,0.2) !important;
            }

        section.big {
            width: 100%;
            margin-bottom: 256px;
        }

        section.fail{
            background: red;
        }

        section.success {
            background: green;
            color: white;
        }

JavaScript

/*
    QuoJS 2.0
    http://quojs.tapquo.com

    Generated by CoffeeScript 1.3.2

    Copyright (C) 2011,2012 Javi Jiménez Villar (@soyjavi)

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of this software and associated documentation files (the "Software"),
    to deal in the Software without restriction, including without limitation
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
    and/or sell copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    DEALINGS IN THE SOFTWARE.
*/

(function(){var a;a=function(){var d,l,f;l=[];f=function(g,e){g=g||l;g.__proto__=f.prototype;g.selector=e||"";return g};d=function(g){var e;if(g){e=d.getDomainSelector(g);return f(e,g)}else return f()};d.extend=function(g){Array.prototype.slice.call(arguments,1).forEach(function(e){var i,m;m=[];for(i in e)m.push(g[i]=e[i]);return m});return g};f.prototype=d.fn={};return d}();window.Quo=a;"$$"in window||(window.$$=a)}).call(this);(function(){(function(a){var d,l,f,g;d=[];l=Object.prototype;a.toType=function(e){return l.toString.call(e).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()};a.isOwnProperty=function(e,i){return l.hasOwnProperty.call(e,i)};a.getDomainSelector=function(e){var i,m,o;i=null;m=[1,9,11];o=a.toType(e);if(o==="array")i=f(e);else...