JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://malsup.github.io/jquery.form.js"></script>
<form id="formFreeSearch" class="form-group ">
<label>
<input id="FreeSearch" name="FreeSearch" placeholder="חיפוש חופשי..." type="text" value="" />
<input id="ViewName" name="ViewName" type="hidden" value="Contacts" />
<input id="ViewID" name="ViewID" type="hidden" value="1" />
</label>
</form>
<div id="resultSearch"></div>
<script type="text/javascript" src="http://malsup.github.com/jquery.form.js"></script>
JavaScript
$(document).ready(function () {
$("#FreeSearch").on("focusout",sendForm);
});
function sendForm(form) {
var options = {
url: "/echo/json/",
dataType: "json",
success: function (data) {
$("#resultSearch").text(data);
},
error: function(){
$("#resultSearch").text("eror!!");
}
};
$("#formFreeSearch").ajaxSubmit(options);
}