Update JQuery ui Combobox with button

Update JQuery ui Combobox with button

Dear community,

I am trying to use the JQuery ui combox and trying to link it to a button.

Here is my fiddle: jsfiddle.net/tokool/e339zu9t                  


What I am trying to achieve is to change the selection of the JQuery dropdown combobox using a separate button called "next".

The result I would like is: every time I press the "next" button the JQuery dropdown should change automatically to the next selection and alert my to the ui.item.value.

So If I have selected Q2 from the combobox, and then I press the "next" button I would like the dropdown menu to automatically change and select Q3 and alert me the ui.item.value.

This functionality is useful because if you have many questions it is easier to press a button and move on the next selection.

I have written a function called "next" but I don't know what to put in there. I have tried various things but nothing seems to work.


Thanks in advance for your help,