JSFiddle - React, Tailwind, and code Playground

by chayacooper

HTML

<form method="post" action="#"> 
     <div id="startTrendy" >Trendy Pics</div>
    <div id="startClassic" style="display:none">Classic Pics</div>

    <input type=checkbox name="taste_quiz[]" value="trendy" class="show_value" checked=checked>Trendy
    <input type=checkbox name="taste_quiz[]" value="classic" class="show_value" >Classic
    </form>

JavaScript

$(document).ready(function(){
        $(".show_value").change(function(){   
        var checkedValue = $('.show_value:checked').val();  
          alert(checkedValue);
                  });    
  });