I am looking to call a function on click of button fetching data-attribute value , As I am versed with jquery how I am looking for this to work
<button id="openmodal" data-user="1" data-purpose="contact form" class="btn__primary" aria-label="Help"></button>
<button id="openmodal" data-user="1" data-purpose="Opt In" class="btn__primary" aria-label="Help"></button>
I will need to fetch the user id and call a function, In jquery typically, I would pass values in data-attributes and fetch them and call required function. I understand I shouldn't be using data-attributes so I am looking out for the best way of doing this , there can be multiple buttons that performs different js function with different data-purpose (attribute) So I will need to pass data-purpose and data-user to the vue component/function