Downloading jQuery () will break facebook as a button / comment. How to manage?

I am coding a large website, but I have shortened my problem in the following tiny html file:

http://dl.dropbox.com/u/3224566/test.html

The problem is that if I (re) load jQuery into content that has facebook code, the latter will not appear even if I reload the script (which will duplicate this all.js script, which is another problem).

How can i fix this?

Regards, Quentin

+5
source share
1 answer

Use FB.XFBML.parse() docs after loading new content

function loadPage() {
  $('#test').load('test.html #test', function() {
    FB.XFBML.parse( );
  }).fadeOut('slow').fadeIn('slow');
}

, id test div id test () ( ) , , .

, $.get

$.get('test.html', 
        function(data) {
                    var temp = $('<div>').html(data).find('#test');
                    $('#test').html(temp.html());
              }
      );
+6

All Articles