Jan. 6th, 2012

theaeblackthorn: (Default)
If you AJAX a facebook like, and a twitter 'tweet this' in, you'll find they don't work.

This is because they fire on a DOM event that isn't fired by an AJAX load, only fired by a thingy load.

Most of the posts out there to solve it are out of date/not answered.

For Twitter
The fix that is used is now out of date, that's because it was a hack that is no longer supported. The only solution, and infact the recommended one is to use the iframe instead of the javascript pull in.

For Facebook
Facebook have been a load smarter. this explains it.

The summary is call this on ajax complete function: FB.XFBML.parse();

Boom, job done.

Profile

theaeblackthorn: (Default)
theaeblackthorn

February 2013

S M T W T F S
     12
3 456789
10111213141516
17181920212223
2425262728  

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 20th, 2017 09:09 am
Powered by Dreamwidth Studios