JSFiddle - React, Tailwind, and code Playground

by Martin Murciego

HTML

<script src="//code.jquery.com/jquery-1.8.2.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css">






<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

        <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script src="http://code.jquery.com/jquery-1.8.2.js"></script>
        <link href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" rel="stylesheet" />
        <script type="text/javascript">
            $(document).ready(function () {
                var headers = $('#accordion .accordion-header');
                var contentAreas = $('#accordion .ui-accordion-content ').hide();
                var expandLink = $('.accordion-expand-all');

                // add the accordion functionality
                headers.click(function () {
                     $('#accordion .ui-accordion-content:visible')['slideUp']().trigger('hide');
                    var panel = $(this).next();
                    var isOpen = panel.is(':visible');

                    // open or close as necessary
                    panel[isOpen ? 'slideUp' : 'slideDown']()
                        // trigger the correct custom event
                        .trigger(isOpen ? 'hide' : 'show');

                    // stop the link from causing a pagescroll
                    return false;
                });

                // hook up the expand/collapse all
                expandLink.click(function () {
                    var isAllOpen = $(this).data('isAllOpen');

                    contentAreas[isAllOpen ? 'hide' : 'show']()
                        .trigger(isAllOpen ? 'hide' : 'show');
                });

                // when panels open or close, check to see if they're all open
                contentAreas.on({
                    // whenever we open a panel, check to see if they're all open
                    // if all...