JSFiddle - React, Tailwind, and code Playground

by swaroop206

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<select class="fstselect"><option>element</option><option class="nextlevel">Next Level</option></select>

<div class="leveltwo">

</div>

CSS

.leveltwo{margin-top:10px;}

JavaScript

$( document).ready(function() {
  $('.fstselect').change(function(){
 $(this).find("option:selected").each(function(){
 
 if($(this).attr("class")=="nextlevel"){
 
 $('.leveltwo').append('<select class="trd_level_select"><option>element</option><option class="thlevel">Next Level</option></select>');
 
 }
  });
   });
    });