airbnb / infinity

UITableViews for the web (DEPRECATED)

Home Page:http://airbnb.io/infinity/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when I use infinity.js

yshuolu opened this issue · comments

When I import the infinity.js into my html, and then I write: var $el = $('#my-infinite-container'); . The chrome console raise an error that is "Uncaught TypeError: Object [object Object] has no method 'on' infinity.js:539"

How can I use this js correctly?

It's hard to tell without any more detail, but my first intuition is that you're not loading jQuery. Make sure to have at least jQuery 1.7.x (1.8.x should work too) in a script tag before infinity.

You're using jQuery 1.5 -- Infinity needs at least the 1.7 version. Try replacing your old jQuery script tag with this:

<script src=https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js></script>