Change the selected value of a drop-down list with jQuery
Change the selected value of a drop-down list with jQuery
Change the selected value of a drop-down list with jQuery
Re: Change the selected value of a drop-down list with jQuery
[jQuery's documentation](http://docs.jquery.com/Attributes/val#val) states:
[jQuery.val] checks, or ***selects***, all the radio buttons, checkboxes, and select options that match the set of values.
This behavior is in `jQuery` versions `1.2` and above.
You most likely want this:
```
$("._statusDDL").val('2');
```
Add `.change()` to see the option in the dropdown list frontend:
```
$("._statusDDL").val('2').change();
```
[jQuery.val] checks, or ***selects***, all the radio buttons, checkboxes, and select options that match the set of values.
This behavior is in `jQuery` versions `1.2` and above.
You most likely want this:
```
$("._statusDDL").val('2');
```
Add `.change()` to see the option in the dropdown list frontend:
```
$("._statusDDL").val('2').change();
```