I'm using the infinite scroll jquery plugin for a website ( https://github.com/paulirish/infinite-scroll )
Everything is fine except that my page is a search so...what happen is:
1) you go on the page, browser auto-locates you and give you back a list of items (eg. bars) around you...Infinite scroll is needed to avoid pagination for this list. Everything works until here...except the fact that i could reache the "end-of-the-infinite-page" and the plugin "unbinds" itself from the scroll.
2) Now....when you want to manually insert an address in the input text, you are free to do it...you write your address, and press enter...and with ajax (no page refresh)...i'll look for lat/lon, locate the address, change the navigation link for the infinite scroll....and,i feel dumb, BUT i can't figure out a way to "reactivate" or "re-bind" the plugin to the event....So my "new search results" do not have a fresh "infinite scroll" instance...
(page "split" correctly and correctly returns a json trying changing "page=NUMBER")
This is what happens in the console:
["math:", 0, 468]
jquery.infinitescroll.min.js:20["heading into ajax",
Array[2]
0 : "/ajax/getCoworkings/?page="
1 : "&latitude=52.5234051&longitude=13.4113999&distance=12"
length : 2
__proto__ : Array[0]
]
jquery.infinitescroll.min.js:20["Using JSON via $.ajax() method"]
jquery.infinitescroll.min.js:20["Error", "end"]
jquery.infinitescroll.min.js:20["Binding", "unbind"]
After the "unbind" i'm not able to bind it again and therefore have the infinit scroll on my next search results........