jquery change selected option to first 1

jquery change selected option to first

myElement.find('option:eq(0)').prop('selected', true);

Here is what the above code is Doing:
1. Find the first option element in the select element.
2. Set the selected property to true.

Similar Posts