Spinners: Toggle a class instead of show/hide.
Toggling spinners also now uses visibility instead of display, so that the space is always reserved and nothing moves around unexpectedly. props cdog, MikeHansenMe, valendesigns. fixes #22839. see #31875, #30725. Built from https://develop.svn.wordpress.org/trunk@31996 git-svn-id: http://core.svn.wordpress.org/trunk@31975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -60,11 +60,11 @@ function options_general_add_js() {
|
||||
});
|
||||
$("input[name='date_format_custom'], input[name='time_format_custom']").change( function() {
|
||||
var format = $(this);
|
||||
format.siblings('.spinner').css('display', 'inline-block'); // show(); can't be used here
|
||||
format.siblings( '.spinner' ).addClass( 'is-active' );
|
||||
$.post(ajaxurl, {
|
||||
action: 'date_format_custom' == format.attr('name') ? 'date_format' : 'time_format',
|
||||
date : format.val()
|
||||
}, function(d) { format.siblings('.spinner').hide(); format.siblings('.example').text(d); } );
|
||||
}, function(d) { format.siblings( '.spinner' ).removeClass( 'is-active' ); format.siblings('.example').text(d); } );
|
||||
});
|
||||
|
||||
var languageSelect = $( '#WPLANG' );
|
||||
|
||||
Reference in New Issue
Block a user