', name: 'Your', uname: 'your', links: '|https://fapzone.co|', v: 249 }); }, 100); }) // // var block_show = false; function scrollMore(){ var $target = $('#showmore'); if (block_show) { return false; } if($target.length){ var wt = $(window).scrollTop(); var wh = $(window).height(); var et = $target.offset().top; var eh = $target.outerHeight(); var dh = $(document).height(); if (wt + wh >= et || wh + wt == dh || eh + et < wh) { var page = $target.attr('data-page'); page++; block_show = true; $.ajax({ url: '/ajax/model/96030/page-' + page, dataType: 'html', success: function(data){ $('#content').append(data); block_show = false; if (!$.trim(data)){ $target.remove(); $('#next_page').remove() } } }); $target.attr('data-page', page); if (page == $target.attr('data-max')) { $target.remove(); $('#next_page').remove() } } }else{ return false; } } $(window).scroll(function() { scrollMore(); }); $(document).ready(function() { scrollMore(); }); jQuery(document).on('click','.like_button',function () { var like_id = $(this).attr('model_id'); $.ajax({ url: '/ajax/like/model/' + like_id + '/', dataType: 'html', success: function(data){ like_data = JSON.parse(data); $( '#like_' + like_id ).html(like_data.like); //$( '#last_likes_' + like_id ).html(like_data.last_likes); $( '#count_likes_' + like_id ).html(like_data.count_likes_v2); } }); }); jQuery(document).on('click','.follow_button',function () { var model_id = $(this).attr('model_id'); $.ajax({ url: '/ajax/follow/model/' + model_id + '/', dataType: 'html', success: function(data){ follow_data = JSON.parse(data); $( '#follow_' + model_id ).text(follow_data.text); } }); });
CLOSE X