JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<input type = "text" class="txt1"/>
<input type="checkbox" class="radio1"/>

JavaScript

$(function(){
	$(".radio1").change(function(){
    alert($(".radio1").prop("checked"));
    if($(".radio1").prop("checked") == true){
      $(".txt1").prop("disabled", true);
    }else{
    	$(".txt1").prop("disabled", false);
    }
  });
});

// http://stackoverflow.com/questions/34217796/how-to-disable-text-field-based-on-checkbox-value-using-jquery-in-rails