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