JSFiddle - React, Tailwind, and code Playground

by borisjavier

HTML

<script>
 
</script>

<table>
  <tr>
    <td>$day1</td>
    <td align=left>USD$$pdays1</td>
    <td><input type='checkbox' id='check1' onclick='Check()' value='1'></td>
  </tr>
</table>
<div id="div1">
  <h3>Get your tickets with presale discount until April the 27th
    <a href="http://www.expo-bitcoin.com/bsv-payment/?pck=123" class="btn btn-success" role="button">Get Tickets!</a></h3>
</div>
<div id="div2" style="display:none">
  <input type="hidden">
</div>

JavaScript

x = false;

  function Check() {
    //check1 = document.getElementById("check1");
    document.getElementById("div1").style.display = 'inline';
   let link_a = (document.getElementById("check1").checked)? "-1" : "";
  //let link_b = (check2==0)?"":check2.checked)? "-2":"";
  //let link_c = (check3==0)?"":check3.checked)? "-3":"";
  //let link_d = (check4==0)?"":check4.checked)? "-4":"";
  //let link_e = (check5==0)?"":check5.checked)? "-5":"";
  complete = "pack" + link_a;
  txt = link_a;
  document.getElementById("div1").style.display = 'none';
  document.getElementById("div2").innerHTML = "<h3>Reserve the these days on the Arena with Pre-Sale Dicount until April the 27th:" + txt + " <a href='http://www.expo-bitcoin.com/bsv-payment/?pck=" + complete + "' class='btn btn-success' role='button'>Check Pricing!</a></h3>";
  document.getElementById("div2").style.display = 'inline';
  x = true;

  }