select onchange jquery get the option data attribute code example Example: jquery get data attribute of selected option $(this).find(':selected').data('id')