$(function() { $('.dealCategorySelect').each(function(i, {value}) { this.dataset.str = value; }); $('body').on('change', '.dealCategorySelect', function() { alert(this.dataset.str); this.dataset.str = this.value; }); });