change data value js code example Example: change data js $('.my-class').attr('data-num', 'myValue');