how to get datalist selected data input attribute value in jquery code example Example: jquery get data attribute of selected option $(this).find(':selected').data('id')