Infinitescroll is not a function with Yii

2019-08-30 10:06发布

I get this type of error "$(...).infinitescroll is not a function" in error console of Firefox - which is very similar to this site: https://github.com/davialexandre/yiinfinite-scroll/issues/3

1条回答
Fickle 薄情
2楼-- · 2019-08-30 10:33

Change these lines:

<script type="text/javascript">
    $.noConflict(); 
    // Code that uses other library's $ can follow here.
</script>

to these:

<script type="text/javascript">
     var $ = jQuery.noConflict(true);
     $.noConflict(); 
     // Code that uses other library's $ can follow here.
</script>

It solves the problem. I still can't figure it out the reason.

查看更多
登录 后发表回答