How can i dynamically add facebook like button using jquery? I'm planning to have a gallery and want to add add like buttons under every image? I've tried this but it doesn't render anything: $('.share_button').append("(fb:like layout='button_count' font='tahoma')(/fb:like)") where share_button is a classname of div tag that will contain the like button.
Thanks in advance, Ivan
$('.share_button').empty()
before appending or updating its innerHTML if you don't need the like button(s) anymore. my experience in some browsers. – Cruller