How to capture the change of 'data-value' in tag ? (html, js)
// dropdown box
<button data-value="">'click'</button>
<ul>
<li>option1</li>
<li>option2</li>
</ul>
I need 1), 2), 3)
1) click li
2) data-value="" -> data-value="1"
3) $(button).on('change?', function() {} );
but change event support ONLY input, text tag not data-value and click event doesn't work. no change data-value right after 'click' event .
so HOW do i get the change event of 'data-value' ?