Frage

I'm writing a website with a deep Facebook integration; via js I call a php file which loads an external web page with some FB comments.

$('#post{$id1}').load('php/loadPost.php?id={$id1} #single-post');";

But usually it doesn't load comments as it should (I would also like to know why it doesn't, but it's not the point now). In the .js file there is

$("#insertHere").on("click", ".well", function(){
     FB.XFBML.parse(this);
});

so that when I click on that particular post, FB comments will load; is there a way to make this happen when the single ".well" div loads? I tried both ready() and waypoint() with no luck.

Thank-you!

edit: I use on() because all "well" divs are created dynamically thanks to the load() function, just so you know.

War es hilfreich?

Lösung

try this if it helps:

$('#post{$id1}').load('php/loadPost.php?id={$id1} #single-post', function() {
  //alert('Load was performed.');
  FB.XFBML.parse();
});
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top