From b4cf878f40bb5342cd7c688ae7952f2232aac8cd Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Mon, 8 Oct 2012 12:01:43 +1000 Subject: [PATCH] Only slide payment box up-and-down if > 1 method --- assets/js/frontend/checkout.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/assets/js/frontend/checkout.js b/assets/js/frontend/checkout.js index 51e7667f0fb..725c62486f2 100644 --- a/assets/js/frontend/checkout.js +++ b/assets/js/frontend/checkout.js @@ -104,12 +104,14 @@ jQuery(document).ready(function($) { } - $('.payment_methods input.input-radio').live('click', function(){ - $('div.payment_box').filter(':visible').slideUp(250); - if ($(this).is(':checked')) { - $('div.payment_box.' + $(this).attr('ID')).slideDown(250); - } - }); + if($('.payment_methods input.input-radio').length > 1) { + $('.payment_methods input.input-radio').live('click', function(){ + $('div.payment_box').filter(':visible').slideUp(250); + if ($(this).is(':checked')) { + $('div.payment_box.' + $(this).attr('ID')).slideDown(250); + } + }); + } $('#order_review input[name=payment_method]:checked').click();