Infinitescroll is not a function with Yii

浪尽此生 提交于 2019-12-12 05:49:03

问题


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:


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.



来源:https://stackoverflow.com/questions/13708722/infinitescroll-is-not-a-function-with-yii

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!