This doesn't work for me. There is some DOM thing so that .data("option", "value) doesn't work. It is only an internal storage process, unable to affect the data-value attr of the element. If you want future access, I prefer using .attr("data-option", "value"). That will be much better.