Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. var $container = false;
  2. var numeroFeeds = 20;
  3. posicaoScroll = $(document).height();
  4.  
  5. var updateFeed = function(limite) {
  6. $('.social-feed-container').socialfeed({
  7. // FACEBOOK
  8. facebook: {
  9. accounts: ['@jointecnologiai'],
  10. limit: limite,
  11. source: 'all',
  12. access_token: '150849908413827|a20e87978f1ac491a0c4a721c961b68c'
  13. },
  14. /*// Twitter
  15. twitter: {
  16. accounts: ["@mateus_quevedo"],
  17. limit: limite,
  18. consumer_key: 'K7VOGoc0kL7clpg0YYlnS7knD', // make sure to have your app read-only
  19. consumer_secret: 'ekUo6A3FTZZZG00SBRxsHInxaZgEqxirOxMrb6pfaadHaUzsXL', // make sure to have your app read-only
  20. },*/
  21.  
  22. // GENERAL SETTINGS
  23. length: 200,
  24. show_media: true,
  25. callback: function() {
  26. console.log("todos os feeds carregados");
  27.  
  28. var $container = $('.social-feed-container').imagesLoaded( function() {
  29. // initialize Packery after all images have loaded
  30. $container.packery({
  31. itemSelector: '.social-feed-element',
  32. gutter: 20
  33. });
  34. });
  35.  
  36. }
  37. });
  38. if($container) {
  39. $container.packery('destroy');
  40. setTimeout(function(){
  41. console.log("ok");
  42. var $container = $('.social-feed-container').imagesLoaded( function() {
  43. // initialize Packery after all images have loaded
  44. $container.packery({
  45. itemSelector: '.social-feed-element',
  46. gutter: 20
  47. });
  48. });
  49. $("html, body").animate({
  50. scrollTop: posicaoScroll
  51. }, 1000);
  52. console.log("mudou?"+posicaoScroll);
  53. }, 3000);
  54. setTimeout(function(){
  55. $("body").removeAttr("style");
  56. $("#loader").fadeOut();
  57. }, 4000);
  58. }
  59.  
  60. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement