title: Bind Change Event to input type file and have it fire every time a file is selected IE 8
body: <p>I have a input element of type file. I am binding a change event to the element on document.ready to perform a function once a file is selected. This works quite well in IE 9+ and Chrome. </p>
  
  <p>However, I have users on IE 8 as well. In IE 8 the event fires the first time and then on all subsequent attempts to select a file the event does not fire. I tried clearing the file name, and that did not seem help. </p>
  
  <p>Hopefully I don't have the do a browser check and if it is IE 8, bind the event after every file selection. </p>
  
  <p>I have this set up on jsfiddle:</p>
  
  <p><a href="http://jsfiddle.net/sanpopo/pjH5p/" rel="nofollow noreferrer">http://jsfiddle.net/sanpopo/pjH5p/</a></p>
  
  <pre><code>&lt;input id="fileToUpload" type="file" name="fileToUpload" /&gt;
  
  $(document).ready(function () {    
      addEventToBrowseFileBtn();
      alert('event was bound');
  });
  
  
  function addEventToBrowseFileBtn() {
          $('#fileToUpload').live('change', function () {
              if ($('#fileToUpload').val() == "") {
                  return false;
              }
              alert('doing some code stuff');
          });
      };
  </code></pre>
  
  <p>Any input advice would be helpful. Thanks!</p>
  
  <p>After doing more research based on some of the comments, I found this post in SO:
  <a href="https://stackoverflow.com/questions/1637503/jquery-change-event-on-select-not-firing-in-ie">jQuery change event on &lt;select&gt; not firing in IE</a>
  looks like the change event has issues with event delegation in IE. All the other solutions I found for input type file suggest using browser detection which I want to avoid.</p>