JSFiddle - React, Tailwind, and code Playground

by dsummersl

HTML

<html>
    <head>
  <script>
     (function() {
         if (typeof jQuery != 'undefined') {
         /* jQuery is already loaded... verify minimum version number of 1.4.2 and reload newer if needed */
         if (/1\.(0|1|2|3|4)\.(0|1)/.test(jQuery.fn.jquery) || /^1.1/.test(jQuery.fn.jquery) || /^1.2/.test(jQuery.fn.jquery)|| /^1.3/.test(jQuery.fn.jquery)) {
         loadJQ();
         }
      } else {
           loadJQ();
        }

    function loadJQ() {
    /* adds a link to jQuery to the head, instead of inline, so it validates */ 
    var headElement = document.getElementsByTagName("head")[0];
    linkElement=document.createElement("script");
    linkElement.src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js";
    linkElement.type="text/javascript";
    headElement.appendChild(linkElement);
   //alert(headElement);
   }

   })();

  </script>
</head>
    <body>
   <button>Click me</button>
   <script type="text/javascript">
     $(document).ready(function() {
       alert("hello");
       $("button").click(function() {
         $(this).hide();
       });
     });
   </script>
 </body>
</html>