Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Working

By: a guest on May 18th, 2012  |  syntax: JavaScript  |  size: 0.83 KB  |  views: 210  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. head.ready(function() {
  3.  
  4. opts = {
  5.  
  6.                 offset: '85%',
  7.                 continuous: 'true',
  8.                 onlyOnScroll: 'true'
  9.  
  10.         };
  11.  
  12.  
  13.  //$('.share-this').on('click', function(e){
  14.  
  15.  
  16. $('.share-this').waypoint(function(event, direction) {
  17.    if (direction === 'down') {
  18.    
  19.  
  20.     var contentId = $('.share-this').attr('rel');
  21.         var uri = $('.share-this').attr('rev');
  22.  
  23.  
  24.  
  25.     $.ajax({
  26.    url: 'http://www.entendu.info/share',
  27.    type: 'GET',
  28.    dataType: 'html',
  29.    data: {id:contentId, url:uri},
  30.    complete: function(xhr, textStatus) {
  31.  
  32.    },
  33.    success: function(data, textStatus, xhr) {
  34.  
  35.    $('#'+contentId).html(data);
  36.    
  37.    },
  38.    error: function(xhr, textStatus, errorThrown) {
  39.  
  40.    }
  41.    });
  42.    
  43.  
  44.    }
  45.    else {
  46.      
  47.       // do this on the way back up through the waypoint
  48.    }
  49.    //});
  50.    
  51.    }, opts);
  52.    
  53.    
  54.    
  55. });