🌐 AI搜索 & 代理 主页
Skip to content

trigger() function not pass extraParameters when trigger click event of a radio element (Only jQuery 3.2.0) #3579

@GrayYoung

Description

@GrayYoung
$(document).on('click', '#tab-type .list-choice :radio', function(event, isSimulated) {
	// Prescription Type
	var pstType = $(this).val(), $colADD = PS.$tabs.eq(3).find('.col-add');

	if(PS.isSingleVision(pstType)) {
		$colADD.find('.form-control').val(PS.data.ADD.defaultValue).valid();
		$colADD.addClass('hidden');
	} else {
		$colADD.removeClass('hidden');
	}
	if(isSimulated !== true) { 
		if(PS.isNonRX(pstType)) {
			PS.$tabs.eq(3).removeClass('active');
		} else {
			// VWC-1075
			PS.$tabs.eq(3).addClass('active').find(':input:visible:first').focus();

			$modal.scrollTop($modal.scrollTop() + PS.$tabs.eq(3).offset().top);
		}
	}
	PS.data.prescriptionType = pstType;
	$btnNext.removeClass('hidden');
});

// In another function
PS.$tabs.eq(2).find(':radio').filter(function() {
	if(this.value === data.prescriptionType) {
		return true;
	}
	if($(this).closest('label').text().trim() === data.prescriptionType) {
		return true;
	}

	return false;
}).trigger('click', [true]);

isSimulated is undefined, it should be true.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions