问题标签 [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.
javascript - InfiniteAjaxScroll TypeError: $ is undefined
Hi I am trying to use Infinite Ajax Scroll in Silverstripe.
The setup is as described in the Getting Started Page http://infiniteajaxscroll.com/docs/getting-started.html and the "jquery-ias.min.js" is referenced with an include statement on my Page.ss Template AFTER including jquery.js
But regardless how I am trying, I get: TypeError: $ is undefined
Any idea what I am missing out? THX!
Page.ss
script.js
Markup
javascript - Silvestripe + Infinite Ajax Scroll: None Left 不断被添加到页面
我在 silverstripe 网站上运行了无限的 ajax 滚动。我还运行了“NoneLeft”扩展程序让人们知道,他们到达了底部。
IAScroll 在 ArticleHolder 页面中显示 ArticlePages 并按应有的方式显示“NoneLeft”文本。现在,当我直接只显示一个 ArticlePage(周围没有 ArticleHolder)时,它也显示了“NoneLeft”文本。有什么办法可以将其关闭或限制到某个页面?还是我必须从 jQuery 中取消绑定 ias?多谢
Silverstripe ArticleHolder.php
脚本.js
#pagination 的 html 输出,当存在多个帖子时
当只有一篇文章时,没有#pagination,但又是“NoneLeft”文本
php - 重置无限滚动以显示通过 AJAX 检索到的新结果
我有一个过滤器表单,它在更改时使用来自数据库的新过滤结果填充容器 div (#results)。但是在更改过滤器后,Infinite Ajax Scroll插件会在第二页显示第一次搜索的结果。在更改事件中,我需要完全重置旧结果并仅显示新结果。我尝试了很多解决方案,但什么也没做。我知道有方法可以做到这一点,但我不明白如何在我的代码中使用它们(查看评论)。
也试过这个解决方案,但不起作用。
类似的问题在这里。
javascript - jquery-ias Issue - Not Loading with Page Footer
I've been trying to get the jquery-ias plugin to work with my website, but there seems to be an issue when I include the footer on the bottom of the page. As long as the footer isn't included, the plugin works flawlessly and loads pages just as it's supposed to. However, the moment that I include the page footer it stops scrolling and instead shows the "Next" link.
Here is the code:
And here is my HTML/PHP:
Hopefully this is something silly that I'm missing here.... (I'm still pretty much a noob when it comes to javascript/jQuery.
Thanks!
jquery-ias - jquery-ias 可以用于 1 页上的 2 个列表吗?
任何人有使用 jquery-ias 的 1 页上的 2 个列表的解决方案吗?或任何其他无限滚动器。
问候,丹尼斯
jquery-ias - 在 jQuery .load() 之后重新启动无限 Ajax 滚动
我正在一个要实现无限滚动的网站上工作。我找到了 IAS 插件,除了一个实例外,它工作得很好。如果我使用 jQuery .load() 函数将新内容加载到 div 中,则无限滚动将停止工作。
这是 IAS 插件的文档:http: //infiniteajaxscroll.com/docs/overview.html
我发现以下似乎相关的问题,但在我看来没有明确的答案——我很抱歉它们不是链接,Stack Overflow 不会让我发布超过 2 个链接:
stackoverflow.com/questions/24419462/
stackoverflow.com/questions/25205507/
stackoverflow.com/questions/20404493/
github.com/webcreate/infinite-ajax-scroll/issues/68
它谈到了破坏功能,但在我试图提出一个似乎什么都不做的解决方案时。我非常喜欢程序员,我担心我可能根本不理解正确实现它所必需的结构或语法。
我这里有一个测试页
无限滚动成功加载第 1、2、3 页。如果您单击顶部的链接以使用 jQuery .load() 加载第 0 页,但无限滚动将停止工作。它应该向下滚动并再次加载第 1、2 和 3 页。
谢谢你。
jquery-ias - Jquery-ias breaking clickable row
I am using jQuery 2.1.1, and have been using it to add 'clickable' to rows returned from a database using this:
That has been working fine. I have now added jquery-ias (2.1.2), and only the first page of returned results has clickable rows.
My jquery-ias code is as follows:
Jquery-ias is working fine, the pages are loading as needed, but the resultant rows are not clickable.
Inspecting the page in Chrome shows that the subsequently loaded rows have not had the clickable attribute added.
The relevant row in the php is this:
All works fine if I use either, but how do I get them to play nicely together?
EDIT.....
OK, I have worked around it using the jquery-ias built-in pageChange event.
This way when ias finds a page change, it waits a second for the page structure to load, and then applies the clickable class.
I can't see this working if it's waiting for images though... doesn't have to for this instance, but there's got to be a better way to do this.
Any pointers?
css - 为什么我的页面上出现 2 个滚动条?1个内滚动条和1个外滚动条?
为什么我的页面上出现 2 个滚动条?1个内滚动条和1个外滚动条?
我在这里使用无限 ajax 滚动:http: //infiniteajaxscroll.com
和纯css视差滚动:http ://blog.keithclark.co.uk/pure-css-parallax-websites/
这是我的演示:http ://bycustomdesign.com/_misc/_09/page1.html
第 1 页生成 2 个滚动条,内部和外部。我不知道为什么。如何摆脱内部滚动条但仍然能够向下滚动到第 2 页和第 3 页。
javascript - 如何绑定和取消绑定无限 ajax-scroll 以便其他 jQuery 工作?
注意:我知道这是一个常见问题,并且已经写了很多关于此的文章,但我似乎无法修复它。
我的 Shopify 商店使用 Ajax 调用将产品添加到购物车并使用 jQuery 更新前端。我最近安装了infinite-ajax-scroll,但这带来了一些问题。
当向下滚动到由infinite-ajax-scroll 加载的产品,然后单击添加到购物车按钮时,ajax 调用和jQuery 更新不再起作用,它会将我重定向到购物车页面。
这是我用来激活 IAS 的内联脚本:
这是负责将产品添加到购物车的代码(ajaxify.js第 161 - 194 行):
我已经添加了基于此 SO postbind
的and方法,但没有成功。unbind
我究竟做错了什么?
您可以在此处查看相关页面。
javascript - 如何取消绑定这段 jquery?
我的 Shopify 商店使用 Ajax 调用将产品添加到购物车并使用 jQuery 更新前端。我最近安装了infinite-ajax-scroll,但这带来了一些问题。
当向下滚动到由infinite-ajax-scroll 加载的产品,然后单击添加到购物车按钮时,ajax 调用和jQuery 更新不再起作用,它会将我重定向到购物车页面。
我通过使用infinite-ajax-scrollrendered
事件重新初始化“ajaxizes”商店的一段jQuery 代码解决了这个问题。
但是现在向下滚动到由无限 ajax-scroll 加载的 20 个新产品时,ajaxifyShopify 会在前 20 个产品上第二次初始化。将前 20 种产品中的一种添加到购物车时,它们会被添加两次。
ajaxifyShopify
我尝试使用 jQuery解绑第一个,.off()
但它不起作用。
ajaxifyShopify
可以在此处的第 261 行找到完整的代码。每次加载新页面时,ajaxifyShopify
都会初始化以“ajaxify”页面。
这是我的代码:
您可以在此处查看相关页面。
我究竟做错了什么?