1
有沒有辦法確定下面的.change
函數是否被jQuery .trigger
調用?確定事件是否被.trigger()調用
$('input[name=TransactionType]').change(function() {
//Clear out values
$('input:text').val('');
$('input:text').text('');
//Display input fields
var radioValue = $(this);
$('#RightDiv').children().each(function() {
if (radioValue.attr('id') == $(this).attr('id')) {
$(this).show();
} else {
$(this).hide();
}
});
}).filter(':checked').trigger('change');
給處理程序添加一個alert或者console.log()? –