yoone-wc-subscriptions/assets/js/frontend.js

12 lines
425 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function($){
// 切换一次性购买/订阅购买时,简单控制 UI可按需扩展隐藏/显示订阅字段)。
$(document).on('change', 'input[name="yoone_sub_purchase_mode"]', function(){
var mode = $(this).val();
var box = $('.yoone-subs-block');
if (mode === 'onetime') {
box.addClass('yoone-subs-onetime');
} else {
box.removeClass('yoone-subs-onetime');
}
});
})(jQuery);