Php file upload: Difference between revisions

From Federal Burro of Information
Jump to navigationJump to search
(Created page with " http://jsfiddle.net/jonathansampson/dAQVM/ <pre> <input type="file" id="control"/> <button id="clear">Clear</button> var control = $("#control"); $("#clear").on("click", fu...")
 
No edit summary
 
Line 11: Line 11:
});
});
</pre>
</pre>
doesn't always work.

Latest revision as of 02:17, 31 July 2013

http://jsfiddle.net/jonathansampson/dAQVM/

<input type="file" id="control"/>
<button id="clear">Clear</button>
var control = $("#control");

$("#clear").on("click", function () {
    control.replaceWith( control = control.clone( true ) );
});

doesn't always work.