if
( $(
'.pagination__next'
).length )
{
$container = $(
'.container-scrl'
);
$container.infiniteScroll({
path:
'.pagination__next'
,
append:
'.post-scrl'
,
history:
false
,
prefill:
true
,
scrollThreshold: 800,
});
$container.on(
'append.infiniteScroll'
,
function
( event, response, path, items ) {
$(
'.files-list-grid .files-list-grid-wrapper'
).css(
"opacity"
, 0);
$(
'.stories-list-grid .stories-list-grid-wrapper'
).css(
"opacity"
, 0);
if
(resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout(collage, 200);
});
$container.on(
'append.infiniteScroll'
,
function
( event, response, path, items ) {
jQuery(
"[data-toggle=popover]"
).popover();
jQuery(
"[data-toggle=tooltip]"
).tooltip();
});
var
link = document.createElement(
'a'
);
$container.on(
'append.infiniteScroll'
,
function
( event, response, path ) {
link.href = path;
ga(
'set'
,
'page'
, link.pathname );
ga(
'send'
,
'pageview'
);
});
}