JQuery change event not working
I have html:
<form id="fileuploadform"> <input type="file" id="fileupload" name="fileupload" /> </form> and jquery:
$(':file').change(function(){ var file = this.files[0]; ... }); The problem is that the change function only works when the file selection differs from the one selected earlier. This, of course, is the meaning of the change event. I want my function to be called with closing the file dialog box. No matter what.
I tried using the select event - it never gets called
I also tried:
$(':file').bind('dialogclose', function(event) { alert('closed'); }); and
$(':file').live("dialogclose", function(){ alert('closed1'); }); They did not work either.