File input url prob.!

File input url prob.!


Im using the plugin, but it is not  taking #img 's src becoz the src is created using readUrl, is  there anyway  to solve?
  1. <img id="img" />
  2. <input type="file" name="image_file" id="add_img"/>

  3. function readURL(input) { // Reading Url
  4.        if (input.files && input.files[0]) {
  5.             var reader = new FileReader();

  6.             reader.onload = function (e) {
  7.                 $('#img').attr('src', e.target.result);
  8.             }
  9. reader.readAsDataURL(input.files[0]);
  10.         }
  11.     }
  12. $("#add_img").change(function(){
  13. readURL(this);
  14. });
  15. $('#img').jWindowCrop();  // PLUGIN CALL