3

SO basically I am using this plugin

https://github.com/webcreate/Infinite-Ajax-Scroll

It fits my needs perfectly and is working pretty seamless.

My website is articles, the problem is the javascript only appears for the first page of data.

For example, my facebook like buttons, hover effect, etc etc only works for the original rows loaded, not for the rows loaded by the plugin when you scroll to load more.

Anyone experience this issue and know how to approach this.

Thanks

4

1 回答 1

0

由于 IAS 的 0.1.5 版有一个名为 的新选项onRenderComplete,这是一个回调函数,您可以在将新项目添加到 DOM 后重新初始化其他 javascript 代码。

您可以在此处阅读更多信息:https ://github.com/webcreate/infinite-ajax-scroll#onrendercomplete

基本上,您可以将任何代码$(document).ready()放入此回调中。

于 2012-09-04T08:47:31.340 回答