Set the value of textbox and hidden fields are both not working

Set the value of textbox and hidden fields are both not working

hi guys
this simple script is not working. 

Please help 
Everything works except lines 17 and 18 (even the alert works)

html elements are

<input type="hidden" name="cropx" id="cropx" value="0" />
<input id="Text1" type="text" value="" />

I have also tried replacing html with val e.g    $('#cropx').val(c.x);

thank you
  1.  $(document).ready(function ($) {
  2.         
  3.         $('#Image1').Jcrop({

  4.            
  5.            bgColor: 'red',
  6.             onSelect: function (c) {
  7.                 $("#ehi").click(function () { //This is just a button ID
  8.                    alert(c.x)
  9.                 });
  10.                 bgColor: 'red'
  11.                 console.log(c.x);
  12.                 console.log(c.y);
  13.                 console.log(c.w);
  14.                 console.log(c.h);
  15.                 $('#cropx').html(c.x);
  16.                 $('Text1').html('I am tired');
  17.                alert("Back of the net: Job done - " + c.x);