私のウェブサイト:http : //www.entendu.info/http://imakewebthings.com/jquery-waypoints/のwaypointsプラグインを使用しています
ユーザーが直接一番下までスクロールすると、ほとんどのウェイポイントはトリガーされず、真ん中のウェイポイントが速すぎて実行できないかのように、最初の2つと最後のウェイポイントだけがトリガーされます。(ウェイポイントは、スクロールしたときに読み込まれるソーシャルボタンです)
何か助けはありますか?PS:head.readyは、headjsを使用して外部スクリプトをロードする場合のdocument.readyの単なる代替手段です。
head.ready(function() {
opts = {
offset: '85%',
continuous: '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
}
//});
$.waypoints('refresh')
}, opts);
});