问题标签 [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 回答
101 浏览

php - How to load different pages like on Reuters.com?

If you read an article on Reuters.com and scroll down to the bottom of the page, another article will show up, and the url changes. If you scroll back you see the previous page, with the previous url.

I have just three php pages that I would like to load one after the other, as one scrolls down the page. Is there a clean way to do that?

Something like:

Page1:

Page2:

Infinite scroll libraries, like jquery-ias don't seem to support such behavior, or at least I don't see how.

0 投票
1 回答
269 浏览

wordpress - 在我的自定义主题中实现 jquery-ias 时遇到问题

我买了这个 javascript jquery 插件:Infinite AJAX Scroll,我想在我创建的 wordpress 主题、首页和档案中使用它。

我尝试使用有关这些链接的文档:https ://infiniteajaxscroll.com/docs/getting-started.html和 Wordpress 之一:https ://infiniteajaxscroll.com/docs/cookbook-wordpress.html

但也许是因为我使用了 2 个不同的循环,一个用于最后三个帖子,第二个用于后面的所有帖子,我不明白它应该如何工作。

这是大循环:

当我尝试在 Wordpress 部分之后使用它时,它只显示“你到了尽头”。

有人可以帮我吗?我对 Javascript 太糟糕了,无法自己理解它。

编辑:ias 配置应该是这样的:

还有 front-page.php 模板

编辑 N°2:

0 投票
0 回答
68 浏览

jquery - InfiniteAjaxScroll 无法在容器内加载 div

我试图在我的项目中使用 InfiniteAjaxScroll 来加载一个页面中的部分。我在一个使用 PHP 作为后端的网站上工作。我创建了一个 HTML 页面,在其中添加了容器和分页,在分页中我在 .next 中添加了我的 ajax URL(我的 ajax 函数返回我的下一个项目的 HTML )

当我滚动页面时,加载程序加载并且 ajax 请求成功,但内容未显示在我的页面中。

我已经尝试使用下面的代码加载事件。它附加内容但不适用于第三项。

我试图检查加载的事件,但它从服务器提供了 Loaded 0 个项目。但是项目类的ajax请求是成功的。

谁能帮我解决这个问题?请帮忙!!

0 投票
1 回答
160 浏览

ajax - 如何重新初始化或销毁`infiniteajaxscroll` V3?

我如何reinitializeIAS 或destroyV3 上?(没有 jquery,我使用 import InfiniteAjaxScroll from '@webcreate/infinite-ajax-scroll';)

他们的文档上也没有reinitialize或没有( https://docs.v3.infiniteajaxscroll.com/reference/methodsdestroy

0 投票
1 回答
47 浏览

javascript - Infinite Ajax Scroll v3 将随机数字查询参数添加到页面 URL

我对 Jquery-IAS ( http://infiniteajaxscroll.com/ ) v3.0.0-beta6 有一个奇怪的问题。它将随机数字查询参数添加到页面 URL。例如,它尝试加载 /?page=2&1612427293001 而不是 /?page=2 并得到 404 错误。在文档中找不到任何关于此的内容。请帮忙!

这是我的分页器链接 HTML 代码:

这是我的 JS 代码:

谢谢你的帮助!

0 投票
1 回答
29 浏览

jquery-ias - 如何使用无限 Ajax 滚动 JSON 示例中所示的 nextHandler 功能

我希望能够将 Infinite Ajax Scroll 用于我正在从事的项目。

我一直在查看 Infinite Scroll JSON 示例(https://infiniteajaxscroll.com/examples/json/),我发现很难理解它是如何工作的。我想知道是否有任何关于如何使用 JS 或 jQuery 处理程序的进一步文档或代码示例,如示例中所示。

最终我想要做的是使用我自己的 ajax 函数加载我的容器“项目”,然后让 Infinite Ajax Scroll 显示它们。我想这样做是因为我的容器“项目”不位于 URL,而是保存为 Wordpress 瞬态。

非常感谢我能得到的任何帮助。

谢谢,大卫。