quick js function

Job ID: 31831617

Budget: £10 – £20 GBP

This is a VERY small project should only take the right person less then 5 mins, I have 2 drop down menus that are populated from an API. They are: category and voices.... in the voices its layed out like.... optgroup = dexters lab and under that is some voices... the category drop down has a list of all the optgroups.... I want it so when a user selects the category it changes the drop down voices to the matching optgroup 1st option? I am using select2 to allow the user to search the drop down menus. Everything works apart from if I select the category it doesn't change the voices drop down as I am struggling to make this happen
Related categories: JavaScript HTML5 jQuery / Prototype