I have 2 select input in my HTML page
<select id="parent">
<option value="1">One</option>
<option value="2">Two</option>
</select>
And
<select name="selectOpt" id="dmSelect">
<option disabled selected >-Select an Option-</option>
</select>
Now I need add some option depending on the value of parent
suppose if one is selected options of selectOpt will be
<option value="a1">a1</option>
<option value="a2">a2</option>
and if two is selected options of selectOpt will be
<option value="b1">b1</option>
<option value="b2">b2</option>
and these options will come from some array
for like
A=["a1","a2"...]
B=["b1","b2"...]
parentusing jquery and can append html to any element using ("#..").append().