jQuery(document).ready(function() { jQuery("div.nsBack-tab-menu>div.list-group>a").click(function(e) { e.preventDefault(); jQuery(this).siblings('a.active').removeClass("active"); jQuery(this).addClass("active"); var index = jQuery(this).index(); jQuery("div.nsBack-tab>div.nsBack-tab-content").removeClass("active"); jQuery("div.nsBack-tab>div.nsBack-tab-content").eq(index).addClass("active"); }); }); // Clear logo image in admin general jQuery(document).ready(function() { jQuery('#ns_reset_logo').click(function() { jQuery('#_wpse_82857').removeAttr('value'); }); }); // Clear favicon in admin general jQuery(document).ready(function() { jQuery('#ns_reset_favicon').click(function() { jQuery('#_wpse_82858').removeAttr('value'); jQuery('#ns_img_logo').addClass('total-display-none'); }); }); // Clear parallax in admin archive jQuery(document).ready(function() { jQuery('#ns_reset_archparall').click(function() { jQuery('#_wpse_82859').removeAttr('value'); }); }); // Clear parallax in admin search jQuery(document).ready(function() { jQuery('#ns_reset_searcharall').click(function() { jQuery('#_wpse_82860').removeAttr('value'); }); }); // Clear logo in admin admin jQuery(document).ready(function() { jQuery('#ns_reset_logo_admin').click(function() { jQuery('#_wpse_82861').removeAttr('value'); }); }); // Display upload logo button jQuery(document).ready(function() { jQuery( '#NSuccesBtnbk1' ).change(function() { if ( jQuery( '#NSuccesBtnbk1' ).prop( "checked" ) ){ jQuery('#upload_logo_switch').removeClass('total-display-none'); }else{ jQuery('#upload_logo_switch').addClass('total-display-none'); } }); }); // Display upload favicon button jQuery(document).ready(function() { jQuery( '#NSuccesBtnbk2' ).change(function() { if ( jQuery( '#NSuccesBtnbk2' ).prop( "checked" ) ){ jQuery('#upload_logo_switch2').removeClass('total-display-none'); }else{ jQuery('#upload_logo_switch2').addClass('total-display-none'); } }); }); // Display custom 404 textarea jQuery(document).ready(function() { jQuery( '#NSuccesBtnbk5' ).change(function() { if ( jQuery( '#NSuccesBtnbk5' ).prop( "checked" ) ){ jQuery('#switch404').removeClass('total-display-none'); }else{ jQuery('#switch404').addClass('total-display-none'); } }); }); // Display admin logo upload jQuery(document).ready(function() { jQuery( '#NSuccesBtnbk25' ).change(function() { if ( jQuery( '#NSuccesBtnbk25' ).prop( "checked" ) ){ jQuery('#upload_logo_admin_switch').removeClass('total-display-none'); }else{ jQuery('#upload_logo_admin_switch').addClass('total-display-none'); } }); }); // Display image in input type text after choosen jQuery(document).ready(function($){ var _custom_media = true, _orig_send_attachment = wp.media.editor.send.attachment; $('#_wpse_82857_button').click(function(e) { var send_attachment_bkp = wp.media.editor.send.attachment; var button = $(this); var id = button.attr('id').replace('_button', ''); _custom_media = true; wp.media.editor.send.attachment = function(props, attachment){ if ( _custom_media ) { $("#"+id).val(attachment.url); } else { return _orig_send_attachment.apply( this, [props, attachment] ); }; } wp.media.editor.open(button); return false; }); $('.add_media').on('click', function(){ _custom_media = false; }); }); //###################################################################################### //###################################################################################### //###################################################################################### jQuery(document).ready(function($){ var _custom_media = true, _orig_send_attachment = wp.media.editor.send.attachment; $('#_wpse_82858_button').click(function(e) { var send_attachment_bkp = wp.media.editor.send.attachment; var button = $(this); var id = button.attr('id').replace('_button', ''); _custom_media = true; wp.media.editor.send.attachment = function(props, attachment){ if ( _custom_media ) { $("#"+id).val(attachment.url); } else { return _orig_send_attachment.apply( this, [props, attachment] ); }; } wp.media.editor.open(button); return false; }); $('.add_media').on('click', function(){ _custom_media = false; }); }); //###################################################################################### //###################################################################################### //###################################################################################### jQuery(document).ready(function($){ var _custom_media = true, _orig_send_attachment = wp.media.editor.send.attachment; $('#_wpse_82859_button').click(function(e) { var send_attachment_bkp = wp.media.editor.send.attachment; var button = $(this); var id = button.attr('id').replace('_button', ''); _custom_media = true; wp.media.editor.send.attachment = function(props, attachment){ if ( _custom_media ) { $("#"+id).val(attachment.url); } else { return _orig_send_attachment.apply( this, [props, attachment] ); }; } wp.media.editor.open(button); return false; }); $('.add_media').on('click', function(){ _custom_media = false; }); }); //###################################################################################### //###################################################################################### //###################################################################################### jQuery(document).ready(function($){ var _custom_media = true, _orig_send_attachment = wp.media.editor.send.attachment; $('#_wpse_82860_button').click(function(e) { var send_attachment_bkp = wp.media.editor.send.attachment; var button = $(this); var id = button.attr('id').replace('_button', ''); _custom_media = true; wp.media.editor.send.attachment = function(props, attachment){ if ( _custom_media ) { $("#"+id).val(attachment.url); } else { return _orig_send_attachment.apply( this, [props, attachment] ); }; } wp.media.editor.open(button); return false; }); $('.add_media').on('click', function(){ _custom_media = false; }); }); //###################################################################################### //###################################################################################### //###################################################################################### jQuery(document).ready(function($){ var _custom_media = true, _orig_send_attachment = wp.media.editor.send.attachment; $('#_wpse_82861_button').click(function(e) { var send_attachment_bkp = wp.media.editor.send.attachment; var button = $(this); var id = button.attr('id').replace('_button', ''); _custom_media = true; wp.media.editor.send.attachment = function(props, attachment){ if ( _custom_media ) { $("#"+id).val(attachment.url); } else { return _orig_send_attachment.apply( this, [props, attachment] ); }; } wp.media.editor.open(button); return false; }); $('.add_media').on('click', function(){ _custom_media = false; }); }); //###################################################################################### //###################################################################################### //######################################################################################