AddEventListener: Disable select option based on value inserted

[ad_1]

Hi,

I’d like to disable an option on a select (x[2]) based on value inserted on a number input field (x[1]).

if (x[1] >= 45) {
	for (let opt of x[2].options) {
		(opt.value == 3500).addAttr('disabled', 'disabled');
	}
}

x[1] is a Number input field
x[2] is a Select input

Above function doesn’t seem to work

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer