I’m trying to make a dynamic fb-like button that gets the page location but I’m looking for the best practices for replacing the data-href element of html:
I have two pieces of the puzzle:
<div class="fb-like" data-href='' data-send="true" data-colorscheme="dark" data-width="450" data-show-faces="true"></div>- top.location.href
Which js method would allow top.location.href to replace data-href element, AND render the facebook like button?
Like you normally would?
or:
If you prefer jQuery.