mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-06-05 15:08:20 +09:00
fix js (default)
This commit is contained in:
@@ -43,25 +43,22 @@ jQuery(document).ready(function($){
|
||||
|
||||
});
|
||||
|
||||
$( '.delete_image' ).click( function(e) {
|
||||
$( '.delete_image' ).click( function() {
|
||||
|
||||
target_input = $(this).prevAll( '.upload_image_id' );
|
||||
previewView = $(this).prevAll( '#upload_logo_preview' );
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
$( target_input ).val( '' );
|
||||
$( previewView ).remove();
|
||||
|
||||
});
|
||||
|
||||
$( '#submit' ).click( function(e) {
|
||||
$( '#submit' ).click( function() {
|
||||
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 ) {
|
||||
if ( $( previewView ).length && $( submitButton ).length ) {
|
||||
$( previewView ).delay( 1000 ).fadeOut( 200, function() {
|
||||
$(this).remove();
|
||||
$( clearInput ).val( '' );
|
||||
|
||||
Reference in New Issue
Block a user