One way you could achieve this is to use the
data-
attributes which can be applied to elements. Using JS you can select the data attribute values to get additional content for each option:
JSFiddle Example[
^]
If you need to supply more complex information then you'll probably need to store an array of objects in the JS code and use the
selectedIndex
to get the correct object. Something akin to:
const data = [
{},
{ extra: 'I am extra data' },
{ extra: 'I am also extra data' }
];
..
const index = d.selectedIndex;
const extra = data[index];
console.log(extra.extra);