Using infinite scroll w/ a MySQL Database

前端 未结 2 923
梦如初夏
梦如初夏 2021-01-17 01:06

I found a nice ajax/jquery infinite scroll plugin ( http://hycus.com/2011/03/15/infinite-scrolling-like-new-twitter-with-php-mysql-jquery/ ) that I was able to mold well to

2条回答
  •  悲&欢浪女
    2021-01-17 01:12

    Would the above code example with the following mods work to trigger the function at a fixed height from the bottom??

    Add:

    var trigger = $('#postswrapper').height() - 250;
    

    And change:

    if (st >= 0.7*h && !loading && h > 500) {
    

    to:

    if ((st == trigger) && (!loading) && (h > 500)) {
    

提交回复
热议问题