How to get the value from JS and add it to the div as an attribute?

There are 4 blocks with headers and 4 buttons under them, by clicking on the button opens the contact form in popup window.
I need buttons have an attribute with the name of the block header of type <a... data-name="title">, but I have almost all u, all written in JS, and I don't know how to get the JS function header and transmit the value to the attribute button, constantly out errors in the console as I hadn't tried. Then after I will already have the attributes I will be able to poison them through the form in a hidden form (Further instructions in the video).

Link to code:
div and class which is the value of the title : eapps-pricing-table-column-title-text
The number of lines in the code in the function: 7635
Screenshot 1
A screenshot of the code
A screenshot of where I need to insert the title name

Line of code on the button: 8128

There is a video example:
But there had this procedure easier using PHP.

Thank you very much!
March 23rd 20 at 19:24
0 answer

Find more questions by tags WordPressJavaScript