assets/scripts/medium-insert/images.js
function (jqxhr, $placeholder) {
			var $progress = $('.progress:first', $placeholder),
					$img;

			$progress.attr('value', 100);
			$progress.html(100);

			if (jqxhr.responseText) {
				$progress.before('<figure class="mediumInsert-images"><img src="'+ jqxhr.responseText +'" draggable="true" alt=""></figure>');
				$img = $progress.siblings('img');

				$img.load(function () {
					$img.parent().mouseleave().mouseenter();
				});
			} else {
				$progress.before('<div class="mediumInsert-error">There was a problem uploading the file.</div>');

				setTimeout(function () {
					$('.mediumInsert-error:first', $placeholder).fadeOut(function () {
						$(this).remove();
					});
				}, 3000);
			}

			$progress.remove();

			$placeholder.closest('[data-medium-element]').trigger('keyup').trigger('input');
		}
function (jqxhr, $placeholder) {
			var $progress = $('.progress:first', $placeholder),
					$img;

			$progress.attr('value', 100);
			$progress.html(100);

			if (jqxhr.responseText) {
				$progress.before('<figure class="mediumInsert-images"><img src="'+ jqxhr.responseText +'" draggable="true" alt=""></figure>');
				$img = $progress.siblings('img');

				$img.load(function () {
					$img.parent().mouseleave().mouseenter();
				});
			} else {
				$progress.before('<div class="mediumInsert-error">There was a problem uploading the file.</div>');

				setTimeout(function () {
					$('.mediumInsert-error:first', $placeholder).fadeOut(function () {
						$(this).remove();
					});
				}, 3000);
			}

			$progress.remove();

			$placeholder.closest('[data-medium-element]').trigger('keyup').trigger('input');
		}
function ( jqxhr , $placeholder ) { var $progress = $ ( '.progress:first' , $placeholder ) , $img ; $progress . attr ( 'value' , 100 ) ; $progress . html ( 100 ) ; if ( jqxhr . responseText ) { $progress . before ( '<figure class="mediumInsert-images"><img src="' + jqxhr . responseText + '" draggable="true" alt=""></figure>' ) ; $img = $progress . siblings ( 'img' ) ; $img . load ( function ( ) { $img . parent ( ) . mouseleave ( ) . mouseenter ( ) ; } ) ; } else { $progress . before ( '<div class="mediumInsert-error">There was a problem uploading the file.</div>' ) ; setTimeout ( function ( ) { $ ( '.mediumInsert-error:first' , $placeholder ) . fadeOut ( function ( ) { $ ( this ) . remove ( ) ; } ) ; } , 3000 ) ; } $progress . remove ( ) ; $placeholder . closest ( '[data-medium-element]' ) . trigger ( 'keyup' ) . trigger ( 'input' ) ; }
Show uploaded image after upload completed

@param {jqXHR} jqxhr jqXHR object
@return {void}
Show uploaded image after upload completed