Facebook Like and Tweet Buttons

Facebook Like and Tweet Buttons

What's the best way to add Facebook like button, Facebook comments and Tweet button to a jQuery mobile site? I tried many different options but in all of them, plugins work perfectly when you access page directly, but they are broken if the page is called from another one by ajax.

I tried recreating them after pageinit or after pageshow, but it didn't work.