问题标签 [jquery-ias]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
5998 浏览

jquery - AJAX 调用后重置/禁用无限滚动

我正在使用带有过滤功能的无限 ajax-scroll ( https://github.com/webcreate/infinite-ajax-scroll ) 插件。我的过滤器可以使用无限滚动,但我的问题是,每当滚动到达一个过滤器的结果末尾时,即使选择了另一个过滤器,它也将不再滚动。因此,我需要在选择过滤器时重置无限滚动,但我在文档中找不到有关如何重置它的任何地方,并且对 JQuery 不是很好,因此无法解决这个问题。

我也有某些不需要启动滚动的过滤器,并且还需要一种方法来为这些过滤器禁用它。

0 投票
1 回答
1229 浏览

jquery-ias - 将 jquery-ias 与异步加载的内容一起使用

我已经成功地将 jQuery Infinite Ajax Scroll 插件集成到我的开发站点中 - 它被使用了两次,第一次在左侧的线程列表中,第二次在加载单个主题时 - 但我在第二个ias实例时遇到了问题这里。

基本上一个主题的内容是通过 $.get 加载的,然后渲染到页面中,然后我setupThreadDetailDownwardScroll()在 JS 中触发,它创建了一个 ias 的实例:

但问题是这仅适用于您加载的第一个主题 - 您将在第一个线程中获得工作分页,但是当您打开下一个线程时它将回退到锚链接。

所以我认为一旦插入了这个新内容,我需要重新绑定 ias,这就是为什么我添加了unbind()调用 in rendered,然后setupThreadDetailDownwardScroll()每当加载另一个线程时我都会重新调用。这也不起作用。

这里有正确的程序吗?

0 投票
1 回答
176 浏览

jquery-ias - Infinite AJAX Scroll - 无限滚动,无需额外的 html 文件

在无限 AJAX 滚动脚本 (www.infiniteajaxscroll.com) 的示例中,有用于分页的额外 html 文件。我计划在页面上动态创建我的项目(通过 PHP)。有解决方案吗?

0 投票
1 回答
79 浏览

jquery-ias - 如何在横向页面上使用 Infinite AJAX Scroll?

如何在横向页面上使用无限 AJAX 滚动 ( http://infiniteajaxscroll.com/docs/overview.html )?

0 投票
2 回答
1539 浏览

wordpress - Infinite Ajax Scroll: Difficulties With History

I just purchase Infinite Ajax Scroll after having difficulties trying to implement replaceState() with infinite scroll. I have managed to get everything set up to work correctly with the following code:

As you may notice I'm using this along with Metafizzy's Isotope plugin. I am also using it within Wordpress and am hooking this onto the typical Wordpress pagination.

Although everything seems to work ok, it does not work the way that I had intended. My assumption was that it would work somewhat like http://tumbledry.org/, where after scrolling for some time, leaving the page, and clicking back in the browser, it takes the user to the exact same position they were in when clicking on the link. The plugin seems to be using replaceState() with the same url structure that WordPress uses by default for pagination (example.com/page/2). I don't know if this is done on purpose, or if it is a coincidence. As a result of this, when I click into a post and then hit the browser back button, it actually takes me to the example.com/page/2 page, where there is a button to show newer posts at the top of the page. It does not take me to the original posts page, nor to the exact spot on the page where the post is that I clicked (it usually takes me to the bottom of the page). In addition, when I click the button at the top of the page to show newer posts, it appends the newer posts to the bottom of the page (as you can see in my code).

I would like this to work as the tumbledry blog works. Where you can click on a link and then click the back button to get to the exact spot on the page that you were on (no need to load newer posts). Please let me know if this is possible, or if I have botched up the implementation. I would greatly appreciate any in depth information on the functionality because I'd like to figure out how I can get it working the way I want.

0 投票
1 回答
4442 浏览

jquery - JQuery IAS Infinite Scrolling + Packery:未定义 IASCallbacks

我在Tumblr 主题设计上使用Jquery Infinite AJAX 滚动实现 Packery 时遇到问题。它不断返回“未捕获的 ReferenceError:IASCallbacks 未定义”,我无法确定原因。

这是我总结的,但我在 Javascript 方面并不擅长。

如果有人可以提供帮助,将不胜感激。查看http://digitalsocialnetwork.tumblr.com/上的实时页面

0 投票
1 回答
178 浏览

jquery-ias - 无限 Ajax Scroll 每 2 个帖子插入内容 wordpress

我已经在我的 wordpress 博客上安装了无限 ajax 滚动,它工作正常。

我遇到的一件事是我的帖子设置为每第二个帖子添加一些内容。这在第一页上工作得很好,但是一旦无限滚动开始,它就不再每隔第二个选项加载内容。

我在 javascript 方面不是很聪明,如果您能以我的方式发送任何提示,我将不胜感激。我读过我可以使用 onRenderComplete: 但是我不确定如何在页面上实际实现它。

我当前的代码在帖子中调用如下:

然后是我正常的帖子功能。

最后我有这个:

感谢任何帮助。

卡莉

0 投票
1 回答
735 浏览

jquery-ias - 带同位素的无限 Ajax 滚动

无法让 Infinite Ajax Scroll 插件在 Ghost 博客主题上工作。我还在为我的布局使用同位素插件。

在监视开发 cmd 后,我看到滚动时正在发出 GET 请求。他们通常会发回 200,但有时会发回 304。

我有一种预感,这个问题与我对 Isotope 的回调有关,尽管我无法让无限滚动以任何方式工作(禁用 Isotope、所有其他插件等)。

这是代码:

当前对 Isotope 的回调导致最初呈现的内容在页面滚动时向下跳转,但没有向页面添加其他元素。

感谢您的帮助/见解。

更新

在阅读 github repo 中的问题线程后,我意识到问题可能与默认使用的 jQuery Ghost 版本有关 - 1.11.0 所以我尝试使用最新的(2.1.1),但没有改变。

此外,为了更好地解释当前行为:仅返回 304 GET 响应,并且可以继续滚动。执行此操作时,控制台中的页面会循环显示,具体而言,控制台中显示的内容如下:

代码(主题)现在可以在这里调试

0 投票
0 回答
1129 浏览

javascript - 如何实现加载以前的项目,如无限 ajax 滚动历史示例

目前我正在尝试在我的帖子中使用无限 ajax 滚动功能。

在这里,我想创建一个链接来加载以前的项目,例如在此处实现无限 ajax 滚动历史示例:http: //infiniteajaxscroll.com/examples/history/page3.html(请参阅在内容上方加载更多项目。)

我的代码:

Javascript:

HTML 标记

我已经尝试过使用jQuery.ias().prev();方法,但他们没有明确的文档来实现这一点。
有人知道我的代码有什么问题吗?谢谢!

0 投票
1 回答
1243 浏览

infinite-scroll - jquery-ias - 历史扩展按钮样式

我正在使用 Infinite Ajax 滚动插件 ( http://infiniteajaxscroll.com/ ),它对我来说非常有用,除了一件事。

我默认使用所有四个扩展(触发器,微调器,分页,历史,按此顺序),插件隐藏所有分页链接(由服务器生成)并在顶部显示加载更多项目链接(由历史插件)并在容器的底部(通过触发器插件)。

我可以覆盖触发器扩展上的链接(文本和类),但历史扩展使用相同的值,因此您将在容器上方和下方看到相同的按钮。

我尝试将相同的参数添加到历史扩展,但它不起作用:

是否有任何我错过了覆盖默认文本和类的选项?

干杯,盖萨