Reputation: 53
Is there any possibility to get the TITLE in the head to get updated when scrolling?
Im using Infinite Ajax Scroll. http://infiniteajaxscroll.com
var ias = jQuery.ias({
container: '#posts',
item: '.post',
pagination: '#pagination',
next: '.next'
});
jQuery.ias().on('pageChange', function(pageNum, scrollOffset, url) {
// Update Page Title
});
Upvotes: 1
Views: 279
Reputation: 394
I met the same issue with Infinite Ajax Scroll. The only solution I found was to extract the title from "data" on the "loaded" event.
ias.on('loaded', function(data, items) {
var title = data.match(/<title[^>]*>([^<]+)<\/title>/)[1];
document.title = title.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"')
.replace(/'/g, "'");
})
Upvotes: 0