Advertisement
Guest User

Untitled

a guest
Mar 18th, 2014
412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function refreshFBComments() {
  2.     if(undefined == FB ) { // Not yet defined
  3.         return;
  4.     }
  5.     var container_width = $('#fb-comments-container').width();    
  6.     $('#fb-comments-container').html('<div class="fb-comments" '
  7.                                      + 'data-href="' + window.location + '"'
  8.                                      + ' data-width="' + container_width + '"'
  9.                                      + ' data-numposts="5" '
  10.                                      + ' data-colorscheme="light"'
  11.                                      + ' data-height="300px"></div>'
  12.                                     );     
  13.    
  14.     console.log("Resizing setting new content");
  15.     FB.XFBML.parse();
  16.    
  17. }
  18.  
  19. $(window).bind("ready resize", refreshFBComments);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement