clear input after new term is added

This commit is contained in:
Robin Cornett
2015-04-20 10:42:25 -04:00
parent 2449132f54
commit f1b2d067ec
+2
View File
@@ -58,11 +58,13 @@ jQuery(document).ready(function($){
$( '#submit' ).click( function(e) {
submitButton = $(this).parentsUntil( '#addtag' );
previewView = submitButton.siblings( '.term-image-wrap' ).children( '#upload_logo_preview' );
clearInput = submitButton.siblings( '.term-image-wrap' ).children( '.upload_image_id' );
e.preventDefault();
if ( $( previewView ).length ) {
$( previewView ).delay( 1000 ).fadeOut( 200, function() {
$(this).remove();
$( clearInput ).val( '' );
});
}
});