Sliding payment boxes tweaks Closes #4538
This commit is contained in:
parent
87f6958e40
commit
c6cd7e4017
|
@ -10,9 +10,12 @@ jQuery(document).ready(function($){
|
|||
|
||||
.on( 'click init_add_payment_method', '.payment_methods input.input-radio', function() {
|
||||
if ( $('.payment_methods input.input-radio').length > 1 ) {
|
||||
$('div.payment_box').filter(':visible').slideUp(250);
|
||||
if ($(this).is(':checked')) {
|
||||
$('div.payment_box.' + $(this).attr('ID')).slideDown(250);
|
||||
var target_payment_box = $('div.payment_box.' + $(this).attr('ID') );
|
||||
if ( $(this).is(':checked') && ! target_payment_box.is(':visible') ) {
|
||||
$('div.payment_box').filter(':visible').slideUp(250);
|
||||
if ( $(this).is(':checked') ) {
|
||||
$('div.payment_box.' + $(this).attr('ID') ).slideDown(250);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$('div.payment_box').show();
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(document).ready(function(e){if(typeof woocommerce_params=="undefined")return!1;e("#add_payment_method").on("click init_add_payment_method",".payment_methods input.input-radio",function(){if(e(".payment_methods input.input-radio").length>1){e("div.payment_box").filter(":visible").slideUp(250);e(this).is(":checked")&&e("div.payment_box."+e(this).attr("ID")).slideDown(250)}else e("div.payment_box").show()}).find("input[name=payment_method]:checked").click();e("#add_payment_method").submit(function(){e("#add_payment_method").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",backgroundSize:"16px 16px",opacity:.6}})});e("body").trigger("init_add_payment_method")});
|
||||
jQuery(document).ready(function(e){if(typeof woocommerce_params=="undefined")return!1;e("#add_payment_method").on("click init_add_payment_method",".payment_methods input.input-radio",function(){if(e(".payment_methods input.input-radio").length>1){var t=e("div.payment_box."+e(this).attr("ID"));if(e(this).is(":checked")&&!t.is(":visible")){e("div.payment_box").filter(":visible").slideUp(250);e(this).is(":checked")&&e("div.payment_box."+e(this).attr("ID")).slideDown(250)}}else e("div.payment_box").show()}).find("input[name=payment_method]:checked").click();e("#add_payment_method").submit(function(){e("#add_payment_method").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",backgroundSize:"16px 16px",opacity:.6}})});e("body").trigger("init_add_payment_method")});
|
|
@ -153,9 +153,12 @@ jQuery(document).ready(function($) {
|
|||
|
||||
.on( 'click', '.payment_methods input.input-radio', function() {
|
||||
if ( $('.payment_methods input.input-radio').length > 1 ) {
|
||||
$('div.payment_box').filter(':visible').slideUp(250);
|
||||
if ($(this).is(':checked')) {
|
||||
$('div.payment_box.' + $(this).attr('ID')).slideDown(250);
|
||||
var target_payment_box = $('div.payment_box.' + $(this).attr('ID') );
|
||||
if ( $(this).is(':checked') && ! target_payment_box.is(':visible') ) {
|
||||
$('div.payment_box').filter(':visible').slideUp(250);
|
||||
if ( $(this).is(':checked') ) {
|
||||
$('div.payment_box.' + $(this).attr('ID') ).slideDown(250);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$('div.payment_box').show();
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue