I have a variable declared: var fburl = data.results[0].alias;
How can I pass the var value to the HTML data-type?
Example:
var myurl = data.results[0].alias;
<div class="myclass" data-url="value in myurl"></div>
===========
Apologize not able to explain clearly as I am no expert in js.
Get meta dynamically, and pass the values to addthis meta type. I used .attr and it works, but not for Twitter meta.
var mymeta = $('.addthis_inline_share_toolbox_4m3m');
mymeta.attr('data-url', myurl);
mymeta.attr('data-title', mytitle);
mymeta.attr('data-description', mydesc);
mymeta.attr('data-media', myimage);
}