dynamically set data attribute jquery

This answer is for those seeking to just change the value of a data-attribute. If the specified attribute already exists, only the value is set/changed. The suggested will not change the value of your Jquery data-attr correctly as @adeneo has stated. How to change the Content of a