Advertisement
Guest User

Working

a guest
May 18th, 2012
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement