blogger - 如何在 Blogger 中制作无限滚动页面?

标签 blogger infinite-scroll

我有一个博客,希望使其无限滚动,这样您就不必点击页面和帖子页面。任何人都可以帮助我编写代码(根据 Blogger 的 HTML 格式)吗? 谢谢:-)

最佳答案

如何向 Blogger 博客添加无限滚动

最近读到一篇有趣的文章,How to add infinite scrolling to Blogger blogs 。如果您正在使用 Blogger 的博客,您可以按照说明操作,让您的博客无限滚动,无需太多麻烦。

小部件的代码可在 Google Code 上找到。 。请随意复制或改编代码。

来自他们的website ,有几点值得一提:

  • This code uses jQuery library, so don’t forget to include it.
  • Custom template blogs may have to change the value of postContainerSelector variable in the code.
  • You have manually added +1 buttons to my blog. Dynamically loaded posts won’t have the +1 buttons initialised; to fix that issue, I had to call gapi.plusone.go() every time new posts are added to the page.
  • _WidgetManager is a JavaScript object present in Blogger blogs. You can query this object to find some page metadata. This code uses _WidgetManager to determine if the current page is showing a single post. Infinite scrolling is not meaningful when only a single post needs to be displayed.

关于blogger - 如何在 Blogger 中制作无限滚动页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12872070/

相关文章:

javascript - 如何在React中使用可变高度元素实现无限滚动?

javascript - Blogger javascript 与标签搜索冲突

html - 博主数据 :post. firstImageUrl

angularjs - 使用angular js通过URL传递变量

javascript - Angular 4 : Infinite scroll default behavior not working

javascript - 用 jQuery 改变 $ 符号

javascript - jQuery:无限滚动和后退按钮

html - Blogger CSS 问题 : Styles don't get loaded - randomly

image - 在博客上添加 svg 图片作为标题

css - 如何使用CSS隐藏移动版博主的描述