
Working
By: a guest on
May 18th, 2012 | syntax:
JavaScript | size: 0.83 KB | hits: 137 | expires: Never
head.ready(function() {
opts = {
offset: '85%',
continuous: 'true',
onlyOnScroll: 'true'
};
//$('.share-this').on('click', function(e){
$('.share-this').waypoint(function(event, direction) {
if (direction === 'down') {
var contentId = $('.share-this').attr('rel');
var uri = $('.share-this').attr('rev');
$.ajax({
url: 'http://www.entendu.info/share',
type: 'GET',
dataType: 'html',
data: {id:contentId, url:uri},
complete: function(xhr, textStatus) {
},
success: function(data, textStatus, xhr) {
$('#'+contentId).html(data);
},
error: function(xhr, textStatus, errorThrown) {
}
});
}
else {
// do this on the way back up through the waypoint
}
//});
}, opts);
});