And this seems to fix it:
new code:
// hide/show additional payment option fields
var ebTecAcceptPaymentInputs = jQuery('#eb-tec-payment-options-checkboxes input');
// initially show payment option fields that aren't blank.
function ebTecShowHideAdditionalPaymentOptions() {
jQuery('#eb-tec-payment-options-checkboxes ~ #eb-tec-payment-options div').each(function() {
var thisInput = jQuery(this).find('input');
if(thisInput.val() != null) thisInput.closest('div').slideDown(200);
});
}
ebTecShowHideAdditionalPaymentOptions();
// bind our show/hide function.
ebTecAcceptPaymentInputs.change(function() {
var divIndex = ebTecAcceptPaymentInputs.index(this) + 1;
if(this.checked){
jQuery('#eb-tec-payment-options div:eq('+divIndex+')').slideDown(200);
}
else{
jQuery('#eb-tec-payment-options div:eq('+divIndex+')').slideUp(200);
}
});
Also fixes the problem of the payment options not dropping down the first time you click a checkbox (in the original code the show/hide function is only bound to the change event after the first click).
I think the jQuery.each call is the problem, if you replace it with jQuery(selector).each (which is a different function) it appears to work fine.
Interested to see if this fixes it for everybody else.