JavaScript Input

Bind to the change event by type: jqxInput. Author: http://jqwidgets.com

HTML

<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<script src="http://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<div id='content'>
    <input type="text" id="company" />
    <input type="button" id="save" value="Save" />
</div>

JavaScript

$("#company").jqxInput({ height: 25, width: 200, minLength: 1 });
$("#save").jqxButton({ height: 25, width: 80, disabled: true });
$("#company").on("change", function () {
    if ($("#company").jqxInput('val').length == 0) {
        $("#save").jqxButton({ disabled: true });
    }
    else {
        $("#save").jqxButton({ disabled: false });
    }
});