JSFiddle - React, Tailwind, and code Playground

by Ryan Brackett

JavaScript

$(document).ready(function() {
	  $('#registration-form input').each(function() {
	    if ($(this).prop('required')) {
	      $(this).parent().find("label").append("<span class='required'>*</span>");
	    }
	  });


	  var entryQty = < ? php echo $entryQty ? > ;



	  $('#entryQty').change(function() {
	    entryQty = $("#entryQty").val();
	    totalCost = < ? php echo $totalCost ? > * entryQty;

	    $(".totalCost").html(totalCost);

	  });



	});